How to calculate Cosine and Sine?
Question
Application Type
Reactive

Hi buddies,


I hope you are fine.


I'm trying to calculate the Cosine and the Sine, but I can't do it.

I searched in the built-in functions > math and I didn't find any function to do that.


How can I calculate the Cosine and the Sine of a value?

Can you help me?


Best regards,

FC

mvp_badge
MVP
Solution

Hello there Fábio,

Hope you're doing well :)


If you want to calculate trigonometric functions in a Reactive Web App, you can do that using JavaScript. For example, if you want to calculate the cosine:

var result = Math.cos($parameters.InputValue);
$parameters.OutputResult = result;


There is already a Forge component that provides you several actions with some extra validations that you may use for this purpose:

https://www.outsystems.com/forge/component-overview/1730/reactive-utilities

You just need to use Math_Cos and Math_Sin actions in order to calculate the cosine and sine of a value :)


Hope that this helps you!


Kind regards,

Rui Barradas

HI Rui,


I downloaded the component in the Forge and works perfectly, it's amazing!!

It's solved.


Thank you so much.


Best regards,

FC

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.