@override Vector2 clampScalar(double minVal, double maxVal) { x = math.max(minVal, math.min(maxVal, x)); y = math.max(minVal, math.min(maxVal, y)); return this; }