Class Projection

java.lang.Object
me.autobot.lib.math.coordinates.Projection

public class Projection extends Object
A projection of a shape onto an axis.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    The minimum and maximum values of the projection.
    double
    The minimum and maximum values of the projection.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Projection(double min, double max)
    Creates a new projection with the given min and max values.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if this projection overlaps with another projection

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • min

      public double min
      The minimum and maximum values of the projection.
    • max

      public double max
      The minimum and maximum values of the projection.
  • Constructor Details

    • Projection

      public Projection(double min, double max)
      Creates a new projection with the given min and max values.
      Parameters:
      min - The minimum value of the projection. This value must be less than or equal to max.
      max - The maximum value of the projection. This value must be greater than or equal to min.
  • Method Details

    • overlaps

      public boolean overlaps(Projection other)
      Checks if this projection overlaps with another projection
      Parameters:
      other - The other projection to check for overlap with this projection.
      Returns:
      True if the projections overlap, false otherwise.