Interface Point1D<Numerical extends Number>

Type Parameters:
Numerical - The type of the coordinates, which must be a subclass of Number.
All Superinterfaces:
Point, Point1DLike<Numerical>, Serializable

public interface Point1D<Numerical extends Number> extends Point1DLike<Numerical>
A 2-dimensional point with coordinates of type Number.
Since:
8.4.0
  • Method Details

    • coordinate

      Point1D<Numerical> coordinate(ECartesianAxis1D axis, Numerical coordinate)
      Description copied from interface: Point1DLike
      Gets a point with the coordinate on the given axis set to the given value, while keeping other coordinates unchanged.
      Specified by:
      coordinate in interface Point1DLike<Numerical extends Number>
      Parameters:
      axis - The axis for which to adjust the coordinate.
      coordinate - The new coordinate value for the specified axis.
      Returns:
      A point with the specified coordinate and all other coordinates unchanged.
    • coordinateByte

      Point1D<Numerical> coordinateByte(ECartesianAxis1D axis, byte coordinate)
      Description copied from interface: Point1DLike
      Gets a point with the coordinate on the given axis set to the given byte value, while keeping other coordinates unchanged.
      Specified by:
      coordinateByte in interface Point1DLike<Numerical extends Number>
      Parameters:
      axis - The axis for which to adjust the coordinate.
      coordinate - The new coordinate value for the specified axis as a byte.
      Returns:
      A point with the specified coordinate and all other coordinates unchanged.
    • coordinateDouble

      Point1D<Numerical> coordinateDouble(ECartesianAxis1D axis, double coordinate)
      Description copied from interface: Point1DLike
      Gets a point with the coordinate on the given axis set to the given double value, while keeping other coordinates unchanged.
      Specified by:
      coordinateDouble in interface Point1DLike<Numerical extends Number>
      Parameters:
      axis - The axis for which to adjust the coordinate.
      coordinate - The new coordinate value for the specified axis as a double.
      Returns:
      A point with the specified coordinate and all other coordinates unchanged.
    • coordinateFloat

      Point1D<Numerical> coordinateFloat(ECartesianAxis1D axis, float coordinate)
      Description copied from interface: Point1DLike
      Gets a point with the coordinate on the given axis set to the given float value, while keeping other coordinates unchanged.
      Specified by:
      coordinateFloat in interface Point1DLike<Numerical extends Number>
      Parameters:
      axis - The axis for which to adjust the coordinate.
      coordinate - The new coordinate value for the specified axis as a float.
      Returns:
      A point with the specified coordinate and all other coordinates unchanged.
    • coordinateInt

      Point1D<Numerical> coordinateInt(ECartesianAxis1D axis, int coordinate)
      Description copied from interface: Point1DLike
      Gets a point with the coordinate on the given axis set to the given int value, while keeping other coordinates unchanged.
      Specified by:
      coordinateInt in interface Point1DLike<Numerical extends Number>
      Parameters:
      axis - The axis for which to adjust the coordinate.
      coordinate - The new coordinate value for the specified axis as an int.
      Returns:
      A point with the specified coordinate and all other coordinates unchanged.
    • coordinateLong

      Point1D<Numerical> coordinateLong(ECartesianAxis1D axis, long coordinate)
      Description copied from interface: Point1DLike
      Gets a point with the coordinate on the given axis set to the given long value, while keeping other coordinates unchanged.
      Specified by:
      coordinateLong in interface Point1DLike<Numerical extends Number>
      Parameters:
      axis - The axis for which to adjust the coordinate.
      coordinate - The new coordinate value for the specified axis as a long.
      Returns:
      A point with the specified coordinate and all other coordinates unchanged.
    • coordinateShort

      Point1D<Numerical> coordinateShort(ECartesianAxis1D axis, short coordinate)
      Description copied from interface: Point1DLike
      Gets a point with the coordinate on the given axis set to the given short value, while keeping other coordinates unchanged.
      Specified by:
      coordinateShort in interface Point1DLike<Numerical extends Number>
      Parameters:
      axis - The axis for which to adjust the coordinate.
      coordinate - The new coordinate value for the specified axis as a short.
      Returns:
      A point with the specified coordinate and all other coordinates unchanged.
    • dimensions

      default int dimensions()
      Description copied from interface: Point
      The dimension of the point, which is the number of coordinates it has.
      Specified by:
      dimensions in interface Point
      Returns:
      The dimensionality of the point.
    • normalize

      Point1D<Numerical> normalize()
      Description copied from interface: Point
      Normalizes this point so that its length is 1. When its length is 0, returns this point unchanged.
      Specified by:
      normalize in interface Point
      Specified by:
      normalize in interface Point1DLike<Numerical extends Number>
      Returns:
      The normalized point with length 1, or this point unchanged if its length is 0.
    • scale

      Point1D<Numerical> scale(int scale)
      Description copied from interface: Point
      Scales this point by the given ratio.
      Specified by:
      scale in interface Point
      Specified by:
      scale in interface Point1DLike<Numerical extends Number>
      Parameters:
      scale - The ratio in all directions to scale by.
      Returns:
      A new point that is the result of the scaling.
    • scale

      Point1D<Numerical> scale(long scale)
      Description copied from interface: Point
      Scales this point by the given ratio.
      Specified by:
      scale in interface Point
      Specified by:
      scale in interface Point1DLike<Numerical extends Number>
      Parameters:
      scale - The ratio in all directions to scale by.
      Returns:
      A new point that is the result of the scaling.
    • scale

      Point1D<Numerical> scale(float scale)
      Description copied from interface: Point
      Scales this point by the given ratio.
      Specified by:
      scale in interface Point
      Specified by:
      scale in interface Point1DLike<Numerical extends Number>
      Parameters:
      scale - The ratio in all directions to scale by.
      Returns:
      A new point that is the result of the scaling.
    • scale

      Point1D<Numerical> scale(double scale)
      Description copied from interface: Point
      Scales this point by the given ratio.
      Specified by:
      scale in interface Point
      Specified by:
      scale in interface Point1DLike<Numerical extends Number>
      Parameters:
      scale - The ratio in all directions to scale by.
      Returns:
      A new point that is the result of the scaling.
    • scale

      Point1D<Numerical> scale(byte scale)
      Description copied from interface: Point
      Scales this point by the given ratio.
      Specified by:
      scale in interface Point
      Specified by:
      scale in interface Point1DLike<Numerical extends Number>
      Parameters:
      scale - The ratio in all directions to scale by.
      Returns:
      A new point that is the result of the scaling.
    • scale

      Point1D<Numerical> scale(short scale)
      Description copied from interface: Point
      Scales this point by the given ratio.
      Specified by:
      scale in interface Point
      Specified by:
      scale in interface Point1DLike<Numerical extends Number>
      Parameters:
      scale - The ratio in all directions to scale by.
      Returns:
      A new point that is the result of the scaling.
    • translateBy

      Point1D<Numerical> translateBy(Point1DLike<Numerical> delta)
      Translates the point by a given delta.
      Parameters:
      delta - The delta by which to translate the point.
      Returns:
      The translated point.
    • x

      Description copied from interface: Point1DLike
      Returns a point with the x coordinate set to the given value, while keeping other coordinates unchanged.
      Specified by:
      x in interface Point1DLike<Numerical extends Number>
      Parameters:
      x - The new x coordinate value
      Returns:
      A point with the specified x coordinate.
    • xByte

      Point1D<Numerical> xByte(byte x)
      Description copied from interface: Point1DLike
      Returns a point with the x coordinate set to the given byte value, while keeping other coordinates unchanged.
      Specified by:
      xByte in interface Point1DLike<Numerical extends Number>
      Parameters:
      x - The new x coordinate value as a byte
      Returns:
      A point with the specified x coordinate.
    • xDouble

      Point1D<Numerical> xDouble(double x)
      Description copied from interface: Point1DLike
      Returns a point with the x coordinate set to the given double value, while keeping other coordinates unchanged.
      Specified by:
      xDouble in interface Point1DLike<Numerical extends Number>
      Parameters:
      x - The new x coordinate value as a double
      Returns:
      A point with the specified x coordinate.
    • xFloat

      Point1D<Numerical> xFloat(float x)
      Description copied from interface: Point1DLike
      Returns a point with the x coordinate set to the given float value, while keeping other coordinates unchanged.
      Specified by:
      xFloat in interface Point1DLike<Numerical extends Number>
      Parameters:
      x - The new x coordinate value as a float
      Returns:
      A point with the specified x coordinate.
    • xInt

      Point1D<Numerical> xInt(int x)
      Description copied from interface: Point1DLike
      Returns a point with the x coordinate set to the given int value, while keeping other coordinates unchanged.
      Specified by:
      xInt in interface Point1DLike<Numerical extends Number>
      Parameters:
      x - The new x coordinate value as an int
      Returns:
      A point with the specified x coordinate.
    • xLong

      Point1D<Numerical> xLong(long x)
      Description copied from interface: Point1DLike
      Returns a point with the x coordinate set to the given long value, while keeping other coordinates unchanged.
      Specified by:
      xLong in interface Point1DLike<Numerical extends Number>
      Parameters:
      x - The new x coordinate value as a long
      Returns:
      A point with the specified x coordinate.
    • xShort

      Point1D<Numerical> xShort(short x)
      Description copied from interface: Point1DLike
      Returns a point with the x coordinate set to the given short value, while keeping other coordinates unchanged.
      Specified by:
      xShort in interface Point1DLike<Numerical extends Number>
      Parameters:
      x - The new x coordinate value as a short
      Returns:
      A point with the specified x coordinate.