Class Vector4f

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

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

    • ZERO

      public static final Vector4f ZERO
    • UNIT_X

      public static final Vector4f UNIT_X
    • UNIT_Y

      public static final Vector4f UNIT_Y
    • UNIT_Z

      public static final Vector4f UNIT_Z
    • UNIT_W

      public static final Vector4f UNIT_W
    • ONE

      public static final Vector4f ONE
  • Constructor Details

    • Vector4f

      public Vector4f(Vector2f v)
    • Vector4f

      public Vector4f(Vector2f v, double z, double w)
    • Vector4f

      public Vector4f(Vector2f v, float z, float w)
    • Vector4f

      public Vector4f(Vector3f v)
    • Vector4f

      public Vector4f(Vector3f v, double w)
    • Vector4f

      public Vector4f(Vector3f v, float w)
    • Vector4f

      public Vector4f(VectorNf v)
    • Vector4f

      public Vector4f(double x, double y, double z, double w)
    • Vector4f

      public Vector4f(float x, float y, float z, float w)
  • Method Details

    • x

      public float x()
    • withX

      public Vector4f withX(float x)
    • withX

      public Vector4f withX(double x)
    • y

      public float y()
    • withY

      public Vector4f withY(float y)
    • withY

      public Vector4f withY(double y)
    • z

      public float z()
    • withZ

      public Vector4f withZ(float z)
    • withZ

      public Vector4f withZ(double z)
    • w

      public float w()
    • withW

      public Vector4f withW(float w)
    • withW

      public Vector4f withW(double w)
    • floorX

      public int floorX()
    • floorY

      public int floorY()
    • floorZ

      public int floorZ()
    • floorW

      public int floorW()
    • add

      public Vector4f add(Vector4f v)
    • add

      public Vector4f add(double x, double y, double z, double w)
    • add

      public Vector4f add(float x, float y, float z, float w)
    • sub

      public Vector4f sub(Vector4f v)
    • sub

      public Vector4f sub(double x, double y, double z, double w)
    • sub

      public Vector4f sub(float x, float y, float z, float w)
    • mul

      public Vector4f mul(double a)
    • mul

      public Vector4f mul(float a)
      Specified by:
      mul in interface Vectorf
    • mul

      public Vector4f mul(Vector4f v)
    • mul

      public Vector4f mul(double x, double y, double z, double w)
    • mul

      public Vector4f mul(float x, float y, float z, float w)
    • div

      public Vector4f div(double a)
    • div

      public Vector4f div(float a)
      Specified by:
      div in interface Vectorf
    • div

      public Vector4f div(Vector4f v)
    • div

      public Vector4f div(double x, double y, double z, double w)
    • div

      public Vector4f div(float x, float y, float z, float w)
    • dot

      public float dot(Vector4f v)
    • dot

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

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

      public Vector4f project(Vector4f v)
    • project

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

      public Vector4f project(float x, float y, float z, float w)
    • pow

      public Vector4f pow(double pow)
    • pow

      public Vector4f pow(float power)
      Specified by:
      pow in interface Vectorf
    • ceil

      public Vector4f ceil()
      Specified by:
      ceil in interface Vectorf
    • floor

      public Vector4f floor()
      Specified by:
      floor in interface Vectorf
    • round

      public Vector4f round()
      Specified by:
      round in interface Vectorf
    • abs

      public Vector4f abs()
      Specified by:
      abs in interface Vectorf
    • negate

      public Vector4f negate()
      Specified by:
      negate in interface Vectorf
    • min

      public Vector4f min(Vector4f v)
    • min

      public Vector4f min(double x, double y, double z, double w)
    • min

      public Vector4f min(float x, float y, float z, float w)
    • max

      public Vector4f max(Vector4f v)
    • max

      public Vector4f max(double x, double y, double z, double w)
    • max

      public Vector4f max(float x, float y, float z, float w)
    • distanceSquared

      public float distanceSquared(Vector4f v)
    • distanceSquared

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

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

      public float distance(Vector4f v)
    • distance

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

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

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

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

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

      public Vector2f toVector2()
    • toVector3

      public Vector3f toVector3()
    • toVectorN

      public VectorNf toVectorN()
    • toArray

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

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

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

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

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

      public int compareTo(Vector4f v)
      Specified by:
      compareTo in interface Comparable<Vector4f>
    • 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 Vector4f from(float n)
    • from

      public static Vector4f from(float x, float y, float z, float w)