Class Vector4d

java.lang.Object
org.spongepowered.math.vector.Vector4d
All Implemented Interfaces:
Serializable, Comparable<Vector4d>, Vectord

@Immutable public final class Vector4d extends Object implements Vectord, Comparable<Vector4d>, Serializable
See Also:
  • Field Details

    • ZERO

      public static final Vector4d ZERO
    • UNIT_X

      public static final Vector4d UNIT_X
    • UNIT_Y

      public static final Vector4d UNIT_Y
    • UNIT_Z

      public static final Vector4d UNIT_Z
    • UNIT_W

      public static final Vector4d UNIT_W
    • ONE

      public static final Vector4d ONE
  • Constructor Details

    • Vector4d

      public Vector4d(Vector2d v)
    • Vector4d

      public Vector4d(Vector2d v, float z, float w)
    • Vector4d

      public Vector4d(Vector2d v, double z, double w)
    • Vector4d

      public Vector4d(Vector3d v)
    • Vector4d

      public Vector4d(Vector3d v, float w)
    • Vector4d

      public Vector4d(Vector3d v, double w)
    • Vector4d

      public Vector4d(VectorNd v)
    • Vector4d

      public Vector4d(float x, float y, float z, float w)
    • Vector4d

      public Vector4d(double x, double y, double z, double w)
  • Method Details

    • x

      public double x()
    • withX

      public Vector4d withX(double x)
    • withX

      public Vector4d withX(float x)
    • y

      public double y()
    • withY

      public Vector4d withY(double y)
    • withY

      public Vector4d withY(float y)
    • z

      public double z()
    • withZ

      public Vector4d withZ(double z)
    • withZ

      public Vector4d withZ(float z)
    • w

      public double w()
    • withW

      public Vector4d withW(double w)
    • withW

      public Vector4d withW(float w)
    • floorX

      public int floorX()
    • floorY

      public int floorY()
    • floorZ

      public int floorZ()
    • floorW

      public int floorW()
    • add

      public Vector4d add(Vector4d v)
    • add

      public Vector4d add(float x, float y, float z, float w)
    • add

      public Vector4d add(double x, double y, double z, double w)
    • sub

      public Vector4d sub(Vector4d v)
    • sub

      public Vector4d sub(float x, float y, float z, float w)
    • sub

      public Vector4d sub(double x, double y, double z, double w)
    • mul

      public Vector4d mul(float a)
    • mul

      public Vector4d mul(double a)
      Specified by:
      mul in interface Vectord
    • mul

      public Vector4d mul(Vector4d v)
    • mul

      public Vector4d mul(float x, float y, float z, float w)
    • mul

      public Vector4d mul(double x, double y, double z, double w)
    • div

      public Vector4d div(float a)
    • div

      public Vector4d div(double a)
      Specified by:
      div in interface Vectord
    • div

      public Vector4d div(Vector4d v)
    • div

      public Vector4d div(float x, float y, float z, float w)
    • div

      public Vector4d div(double x, double y, double z, double w)
    • dot

      public double dot(Vector4d v)
    • dot

      public double dot(float x, float y, float z, float w)
    • dot

      public double dot(double x, double y, double z, double w)
    • project

      public Vector4d project(Vector4d v)
    • project

      public Vector4d project(float x, float y, float z, float w)
    • project

      public Vector4d project(double x, double y, double z, double w)
    • pow

      public Vector4d pow(float pow)
    • pow

      public Vector4d pow(double power)
      Specified by:
      pow in interface Vectord
    • ceil

      public Vector4d ceil()
      Specified by:
      ceil in interface Vectord
    • floor

      public Vector4d floor()
      Specified by:
      floor in interface Vectord
    • round

      public Vector4d round()
      Specified by:
      round in interface Vectord
    • abs

      public Vector4d abs()
      Specified by:
      abs in interface Vectord
    • negate

      public Vector4d negate()
      Specified by:
      negate in interface Vectord
    • min

      public Vector4d min(Vector4d v)
    • min

      public Vector4d min(float x, float y, float z, float w)
    • min

      public Vector4d min(double x, double y, double z, double w)
    • max

      public Vector4d max(Vector4d v)
    • max

      public Vector4d max(float x, float y, float z, float w)
    • max

      public Vector4d max(double x, double y, double z, double w)
    • distanceSquared

      public double distanceSquared(Vector4d v)
    • distanceSquared

      public double distanceSquared(float x, float y, float z, float w)
    • distanceSquared

      public double distanceSquared(double x, double y, double z, double w)
    • distance

      public double distance(Vector4d v)
    • distance

      public double distance(float x, float y, float z, float w)
    • distance

      public double distance(double x, double y, double z, double w)
    • lengthSquared

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

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

      public Vector4d normalize()
      Specified by:
      normalize 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
    • toVector2

      public Vector2d toVector2()
    • toVector3

      public Vector3d toVector3()
    • toVectorN

      public VectorNd toVectorN()
    • toArray

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

      public Vector4i toInt()
      Specified by:
      toInt in interface Vectord
    • toLong

      public Vector4l toLong()
      Specified by:
      toLong in interface Vectord
    • toFloat

      public Vector4f toFloat()
      Specified by:
      toFloat in interface Vectord
    • toDouble

      public Vector4d toDouble()
      Specified by:
      toDouble in interface Vectord
    • compareTo

      public int compareTo(Vector4d v)
      Specified by:
      compareTo in interface Comparable<Vector4d>
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • from

      public static Vector4d from(double n)
    • from

      public static Vector4d from(double x, double y, double z, double w)