java.lang.Object
io.github.shimeoki.jfx.rasterization.Vector2f
All Implemented Interfaces:
Point2f

public final class Vector2f extends Object implements Point2f
Standard implementation of the Point2f.
Since:
2.0.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Vector2f(float x, float y)
    Creates a new instance of Vector2f.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setX(float x)
    Sets the value of the first coordinate.
    void
    setY(float y)
    Sets the value of the second coordinate.
    float
    x()
    Gets the first coordinate of the position.
    float
    y()
    Gets the second coordinate of the position.

    Methods inherited from class java.lang.Object

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

    • Vector2f

      public Vector2f(float x, float y)
      Creates a new instance of Vector2f.
      Parameters:
      x - initial value of x (first) coordinate
      y - initial value of y (second) coordinate
      Since:
      2.0.0
  • Method Details

    • x

      public float x()
      Description copied from interface: Point2f
      Gets the first coordinate of the position.
      Specified by:
      x in interface Point2f
      Returns:
      x (first) float coordinate
    • setX

      public void setX(float x)
      Description copied from interface: Point2f
      Sets the value of the first coordinate.
      Specified by:
      setX in interface Point2f
      Parameters:
      x - new value of x (first) coordinate as a float
    • y

      public float y()
      Description copied from interface: Point2f
      Gets the second coordinate of the position.
      Specified by:
      y in interface Point2f
      Returns:
      y (second) float coordinate
    • setY

      public void setY(float y)
      Description copied from interface: Point2f
      Sets the value of the second coordinate.
      Specified by:
      setY in interface Point2f
      Parameters:
      y - new value of y (second) coordinate as a float