Class Vector2ifx

    • Constructor Detail

      • Vector2ifx

        public Vector2ifx()
        Construct a zero vector.
      • Vector2ifx

        public Vector2ifx​(javafx.beans.property.IntegerProperty xProperty,
                          javafx.beans.property.IntegerProperty yProperty)
        Construct a vector with the given properties for the coordinates.
        Parameters:
        xProperty - property for the x coordinate.
        yProperty - property for the y coordinate.
      • Vector2ifx

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

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

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

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

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

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

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

      • convert

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

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

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

        @Pure
        public static Vector2ifx 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<Vector2ifx,​Point2ifx>
        Returns:
        the length of this vector
      • lengthProperty

        public javafx.beans.property.DoubleProperty 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<Vector2ifx,​Point2ifx>
        Returns:
        the squared length of this vector
      • lengthSquaredProperty

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