Class Vector2f

    • Constructor Detail

      • Vector2f

        public Vector2f​(Vector3f v)
      • Vector2f

        public Vector2f​(Vector4f v)
      • Vector2f

        public Vector2f​(VectorNf v)
      • Vector2f

        public Vector2f​(double x,
                        double y)
      • Vector2f

        public Vector2f​(float x,
                        float y)
    • Method Detail

      • x

        public float x()
      • y

        public float y()
      • floorX

        public int floorX()
      • floorY

        public int floorY()
      • add

        public Vector2f add​(double x,
                            double y)
      • add

        public Vector2f add​(float x,
                            float y)
      • sub

        public Vector2f sub​(double x,
                            double y)
      • sub

        public Vector2f sub​(float x,
                            float y)
      • mul

        public Vector2f mul​(double a)
      • mul

        public Vector2f mul​(double x,
                            double y)
      • mul

        public Vector2f mul​(float x,
                            float y)
      • div

        public Vector2f div​(double a)
      • div

        public Vector2f div​(double x,
                            double y)
      • div

        public Vector2f div​(float x,
                            float y)
      • dot

        public float dot​(Vector2f v)
      • dot

        public float dot​(double x,
                         double y)
      • dot

        public float dot​(float x,
                         float y)
      • project

        public Vector2f project​(double x,
                                double y)
      • project

        public Vector2f project​(float x,
                                float y)
      • pow

        public Vector2f pow​(double pow)
      • min

        public Vector2f min​(double x,
                            double y)
      • min

        public Vector2f min​(float x,
                            float y)
      • max

        public Vector2f max​(double x,
                            double y)
      • max

        public Vector2f max​(float x,
                            float y)
      • distanceSquared

        public float distanceSquared​(Vector2f v)
      • distanceSquared

        public float distanceSquared​(double x,
                                     double y)
      • distanceSquared

        public float distanceSquared​(float x,
                                     float y)
      • distance

        public float distance​(Vector2f v)
      • distance

        public float distance​(double x,
                              double y)
      • distance

        public float distance​(float x,
                              float y)
      • length

        public float length()
        Specified by:
        length in interface Vectorf
      • minAxis

        public int minAxis()
        Return the axis with the minimal value.
        Specified by:
        minAxis in interface Vectorf
        Returns:
        int axis with minimal value
      • maxAxis

        public int maxAxis()
        Return the axis with the maximum value.
        Specified by:
        maxAxis in interface Vectorf
        Returns:
        int axis with maximum value
      • toVector3

        public Vector3f toVector3()
      • toVector3

        public Vector3f toVector3​(double z)
      • toVector3

        public Vector3f toVector3​(float z)
      • toVector4

        public Vector4f toVector4()
      • toVector4

        public Vector4f toVector4​(double z,
                                  double w)
      • toVector4

        public Vector4f toVector4​(float z,
                                  float w)
      • toVectorN

        public VectorNf toVectorN()
      • toArray

        public float[] toArray()
        Specified by:
        toArray in interface Vectorf
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • from

        public static Vector2f from​(float n)
      • from

        public static Vector2f from​(float x,
                                    float y)
      • createRandomDirection

        public static Vector2f createRandomDirection​(Random random)
        Gets the direction vector of a random angle using the random specified.
        Parameters:
        random - to use
        Returns:
        the random direction vector
      • createDirectionDeg

        public static Vector2f createDirectionDeg​(double angle)
        Gets the direction vector of a certain angle in degrees.
        Parameters:
        angle - in degrees
        Returns:
        the direction vector
      • createDirectionDeg

        public static Vector2f createDirectionDeg​(float angle)
        Gets the direction vector of a certain angle in degrees.
        Parameters:
        angle - in degrees
        Returns:
        the direction vector
      • createDirectionRad

        public static Vector2f createDirectionRad​(double angle)
        Gets the direction vector of a certain angle in radians.
        Parameters:
        angle - in radians
        Returns:
        the direction vector
      • createDirectionRad

        public static Vector2f createDirectionRad​(float angle)
        Gets the direction vector of a certain angle in radians.
        Parameters:
        angle - in radians
        Returns:
        the direction vector