Class Vector2d

    • Constructor Detail

      • Vector2d

        public Vector2d​(Vector3d v)
      • Vector2d

        public Vector2d​(Vector4d v)
      • Vector2d

        public Vector2d​(VectorNd v)
      • Vector2d

        public Vector2d​(float x,
                        float y)
      • Vector2d

        public Vector2d​(double x,
                        double y)
    • Method Detail

      • x

        public double x()
      • y

        public double y()
      • floorX

        public int floorX()
      • floorY

        public int floorY()
      • add

        public Vector2d add​(float x,
                            float y)
      • add

        public Vector2d add​(double x,
                            double y)
      • sub

        public Vector2d sub​(float x,
                            float y)
      • sub

        public Vector2d sub​(double x,
                            double y)
      • mul

        public Vector2d mul​(float a)
      • mul

        public Vector2d mul​(float x,
                            float y)
      • mul

        public Vector2d mul​(double x,
                            double y)
      • div

        public Vector2d div​(float a)
      • div

        public Vector2d div​(float x,
                            float y)
      • div

        public Vector2d div​(double x,
                            double y)
      • dot

        public double dot​(Vector2d v)
      • dot

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

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

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

        public Vector2d project​(double x,
                                double y)
      • pow

        public Vector2d pow​(float pow)
      • min

        public Vector2d min​(float x,
                            float y)
      • min

        public Vector2d min​(double x,
                            double y)
      • max

        public Vector2d max​(float x,
                            float y)
      • max

        public Vector2d max​(double x,
                            double y)
      • distanceSquared

        public double distanceSquared​(Vector2d v)
      • distanceSquared

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

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

        public double distance​(Vector2d v)
      • distance

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

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

        public double length()
        Specified by:
        length in interface Vectord
      • minAxis

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

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

        public Vector3d toVector3()
      • toVector3

        public Vector3d toVector3​(float z)
      • toVector3

        public Vector3d toVector3​(double z)
      • toVector4

        public Vector4d toVector4()
      • toVector4

        public Vector4d toVector4​(float z,
                                  float w)
      • toVector4

        public Vector4d toVector4​(double z,
                                  double w)
      • toVectorN

        public VectorNd toVectorN()
      • toArray

        public double[] toArray()
        Specified by:
        toArray in interface Vectord
      • hashCode

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

        public static Vector2d from​(double n)
      • from

        public static Vector2d from​(double x,
                                    double y)
      • createRandomDirection

        public static Vector2d 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 Vector2d createDirectionDeg​(float angle)
        Gets the direction vector of a certain angle in degrees.
        Parameters:
        angle - in degrees
        Returns:
        the direction vector
      • createDirectionDeg

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

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

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