API Reference › Vector › Vector.add
method

Vector.add

Vector.add(a, b) -> Vector

Returns the component-wise sum a + b — the workhorse for stepping a position by a velocity each frame.

Example

program Demo {
  handler Step phase Update {
    pos = Vector.add(pos, velocity)
  }
}
← All symbols