Class Vector2dfx

    • Constructor Detail

      • Vector2dfx

        public Vector2dfx()
        Construct a zero vector.
      • Vector2dfx

        public Vector2dfx​(javafx.beans.property.DoubleProperty x,
                          javafx.beans.property.DoubleProperty y)
        Construct a vector with the given coordinate properties.
        Parameters:
        x - the property for the x coordinate.
        y - the property for the y coordinate.
      • Vector2dfx

        public Vector2dfx​(Tuple2D<?> tuple)
        Constructor by copy.
        Parameters:
        tuple - is the tuple to copy.
      • Vector2dfx

        public Vector2dfx​(int[] tuple)
        Constructor by copy.
        Parameters:
        tuple - is the tuple to copy.
      • Vector2dfx

        public Vector2dfx​(double[] tuple)
        Constructor by copy.
        Parameters:
        tuple - is the tuple to copy.
      • Vector2dfx

        public Vector2dfx​(int x,
                          int y)
        Construct a vector with the given coordinates.
        Parameters:
        x - x coordinate.
        y - y coordinate.
      • Vector2dfx

        public Vector2dfx​(float x,
                          float y)
        Construct a vector with the given coordinates.
        Parameters:
        x - x coordinate.
        y - y coordinate.
      • Vector2dfx

        public Vector2dfx​(double x,
                          double y)
        Construct a vector with the given coordinates.
        Parameters:
        x - x coordinate.
        y - y coordinate.
      • Vector2dfx

        public Vector2dfx​(long x,
                          long y)
        Construct a vector with the given coordinates.
        Parameters:
        x - x coordinate.
        y - y coordinate.
    • Method Detail

      • convert

        public static Vector2dfx convert​(Tuple2D<?> tuple)
        Convert the given tuple to a real Vector2dfx.

        If the given tuple is already a Vector2dfx, it is replied.

        Parameters:
        tuple - the tuple.
        Returns:
        the Vector2dfx.
        Since:
        14.0
      • toOrientationVector

        @Pure
        public static Vector2dfx toOrientationVector​(double angle)
        Replies the orientation vector, which is corresponding to the given angle on a trigonometric circle.
        Parameters:
        angle - is the angle in radians to translate.
        Returns:
        the orientation vector which is corresponding to the given angle.
      • getLength

        public double getLength()
        Description copied from interface: Vector2D
        Returns the length of this vector.
        Specified by:
        getLength in interface Vector2D<Vector2dfx,​Point2dfx>
        Returns:
        the length of this vector
      • lengthProperty

        public javafx.beans.property.ReadOnlyDoubleProperty lengthProperty()
        Replies the property that represents the length of the vector.
        Returns:
        the length property
      • getLengthSquared

        public double getLengthSquared()
        Description copied from interface: Vector2D
        Returns the squared length of this vector.
        Specified by:
        getLengthSquared in interface Vector2D<Vector2dfx,​Point2dfx>
        Returns:
        the squared length of this vector
      • lengthSquaredProperty

        public javafx.beans.property.ReadOnlyDoubleProperty lengthSquaredProperty()
        Replies the property that represents the length of the vector.
        Returns:
        the length property