clampedToX method

Vector2 clampedToX(
  1. double min,
  2. double max
)
inherited

Copy of this with the x component clamped between min and max.

Implementation

Vector2 clampedToX(double min, double max) =>
    .new(x.clamp(min, max).toDouble(), y);