fromRadians static method

Vector2 fromRadians(
  1. double r
)

Creates a heading Vector2 with the given angle in radians.

Implementation

static Vector2 fromRadians(double r) => Vector2(0, -1)..rotate(r);