API Reference › Vector › Vector.angle
method

Vector.angle

Vector.angle(v) -> fixed

Returns the angle of v in radians, measured from +x, in the range -pi..pi (via atan2). Feed it back into Vector.from_angle or Vector.rotate.

Example

program Demo {
  handler Step phase Update {
    let heading = Vector.angle(velocity)
  }
}
← All symbols