Class PointClamper

Object
PointClamper

public class PointClamper extends Object
Utility class to ensure a point has values contained inside image-dimensions.
  • Method Details

    • clamp

      public static Point3i clamp(Point3i point, Dimensions dimensions)
      Clamps an integer point to be within the given dimensions.
      Parameters:
      point - the point to clamp
      dimensions - the dimensions to clamp within
      Returns:
      a new Point3i with clamped coordinates
    • clamp

      public static Point3d clamp(Point3d point, Dimensions dimensions)
      Clamps a double-precision point to be within the given dimensions.
      Parameters:
      point - the point to clamp
      dimensions - the dimensions to clamp within
      Returns:
      a new Point3d with clamped coordinates