API Reference › Math › Math.acos
method

Math.acos

Math.acos(x) -> fixed

Returns the angle in radians whose cosine is x, in 0..pi. The input should be in -1.0..1.0. Handy for recovering the angle between two normalized directions from their dot product.

Example

program Demo {
  handler Step phase Update {
    let between = Math.acos(dot)
  }
}
← All symbols