Record Class Triangle2d.ClosestPoint

java.lang.Object
java.lang.Record
frc.robot.math.geometry.Triangle2d.ClosestPoint
Enclosing class:
Triangle2d

public static record Triangle2d.ClosestPoint(Translation2d point, double v, double w, double squaredDistance, boolean inside) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClosestPoint(Translation2d point, double v, double w, double squaredDistance, boolean inside)
    Creates an instance of a ClosestPoint record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the inside record component.
    Returns the value of the point record component.
    double
    Returns the value of the squaredDistance record component.
    final String
    Returns a string representation of this record class.
    double
    v()
    Returns the value of the v record component.
    double
    w()
    Returns the value of the w record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ClosestPoint

      public ClosestPoint(Translation2d point, double v, double w, double squaredDistance, boolean inside)
      Creates an instance of a ClosestPoint record class.
      Parameters:
      point - the value for the point record component
      v - the value for the v record component
      w - the value for the w record component
      squaredDistance - the value for the squaredDistance record component
      inside - the value for the inside record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • point

      public Translation2d point()
      Returns the value of the point record component.
      Returns:
      the value of the point record component
    • v

      public double v()
      Returns the value of the v record component.
      Returns:
      the value of the v record component
    • w

      public double w()
      Returns the value of the w record component.
      Returns:
      the value of the w record component
    • squaredDistance

      public double squaredDistance()
      Returns the value of the squaredDistance record component.
      Returns:
      the value of the squaredDistance record component
    • inside

      public boolean inside()
      Returns the value of the inside record component.
      Returns:
      the value of the inside record component