API Reference › IVec2 › IVec2.step
method

IVec2.step

IVec2.step(degrees) -> IVec2

The heading snapped to the eight compass steps: each component is -1, 0 or 1. A roll or knockback direction from an aim angle.

Example

# doc-check: skip — illustrative
let direction = IVec2.step(TopDown.of(player).aim_angle)
← All symbols