What math functions are available and how to use them?

I am new to to this language and struggling to figure out how to calculate trig functions and their inverses as well as roots and powers any help would be much appreciated.

For many of the everyday math operations (sin(), cos(), etc) you should use the standard browser javascript APIs described here: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Math

For vector, matrix or quaternion maths functions. PlayCanvas has an extensive API. Try searching the developer documentation for what you need. e.g. http://developer.playcanvas.com/en/api/pc.Vec3.html

1 Like