API Reference › Vector › Vector.length
method

Vector.length

Vector.length(v) -> fixed

Returns the Euclidean length of v, computed with the deterministic fixed-point square root. When you only need to compare magnitudes, comparing Vector.dot(v, v) avoids the square root.

Example

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