Vector2Rotate function

Vector2 Vector2Rotate(
  1. Vector2 v,
  2. double angle
)

Implementation

Vector2 Vector2Rotate(Vector2 v, double angle) {
  final c = math.cos(angle), s = math.sin(angle);
  return Vector2(v.x * c - v.y * s, v.x * s + v.y * c);
}