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); }