cancel
Showing results for 
Search instead for 
Did you mean: 

Trigonometric functions

Please add the trigonometric functions.  These are useful for example for calculating distances between GPS co-ordinates.

Status: Completed
Comments
PowerApps Staff

Thanks for the feedback, this is in our backlog. I've had a scenario where I needed to have the trig functions as well, and as a workaround, I declared a collection at the 'OnVisible' handler for the first screen with the values for the trig functions:

ClearCollect(Angles,
    { Angle: 0, Sin: 0.000, Cos: 1.000 },
    { Angle: 1, Sin: 0.017, Cos: 1.000 },
    { Angle: 2, Sin: 0.035, Cos: 0.999 },
    { Angle: 3, Sin: 0.052, Cos: 0.999 },
    { Angle: 4, Sin: 0.070, Cos: 0.998 },
    { Angle: 5, Sin: 0.087, Cos: 0.996 },
    { Angle: 6, Sin: 0.105, Cos: 0.995 },
    { Angle: 7, Sin: 0.122, Cos: 0.993 },
    { Angle: 8, Sin: 0.139, Cos: 0.990 },
    { Angle: 9, Sin: 0.156, Cos: 0.988 },
    { Angle: 10, Sin: 0.174, Cos: 0.985 },
    { Angle: 11, Sin: 0.191, Cos: 0.982 },
    { Angle: 12, Sin: 0.208, Cos: 0.978 },
    { Angle: 13, Sin: 0.225, Cos: 0.974 },
    { Angle: 14, Sin: 0.242, Cos: 0.970 },
    ...
    { Angle: 356, Sin: -0.070, Cos: 0.998 },
    { Angle: 357, Sin: -0.052, Cos: 0.999 },
    { Angle: 358, Sin: -0.035, Cos: 0.999 },
    { Angle: 359, Sin: -0.017, Cos: 1.000 })

And during the code I could use the Last(FirstN(Angles, <angle value>)) to get the values for the angle. If the angle was not an integer number, I did a simple interpolation. This was enough for my needs, but I understand that it may not be accurate enough for all applications.

PowerApps Staff

This feature has been added a while back.

PowerApps Staff
Status changed to: Completed