Uses of Class
civitas.celestis.math.vector.Vector2

Packages that use Vector2
  • Uses of Vector2 in civitas.celestis.math.decimal

    Methods in civitas.celestis.math.decimal that return Vector2
    Modifier and Type
    Method
    Description
    Decimal2.primValue()
    Converts this vector into a primitive vector.
    Constructors in civitas.celestis.math.decimal with parameters of type Vector2
    Modifier
    Constructor
    Description
     
    Creates a new vector.
  • Uses of Vector2 in civitas.celestis.math.matrix

    Methods in civitas.celestis.math.matrix that return Vector2
    Modifier and Type
    Method
    Description
    Matrix.multiply(Vector2 v)
    Multiplies a vector by this matrix, then returns the resulting vector.
    Methods in civitas.celestis.math.matrix with parameters of type Vector2
    Modifier and Type
    Method
    Description
    Matrix.multiply(Vector2 v)
    Multiplies a vector by this matrix, then returns the resulting vector.
  • Uses of Vector2 in civitas.celestis.math.vector

    Modifier and Type
    Field
    Description
    static final Vector2
    Vector2.NEGATIVE_X
    The negative X unit vector.
    static final Vector2
    Vector2.NEGATIVE_Y
    The negative Y unit vector.
    static final Vector2
    Vector2.POSITIVE_X
    The positive X unit vector.
    static final Vector2
    Vector2.POSITIVE_Y
    The positive Y unit vector.
    static final Vector2
    Vector2.ZERO
    A vector of no direction or magnitude.
    Methods in civitas.celestis.math.vector that return Vector2
    Modifier and Type
    Method
    Description
    Vector2.add(double s)
    Adds a scalar to this vector component-wise, then returns the resulting vector.
    Vector2.add(Vector2 v)
    Adds another vector to this vector, then returns the resulting vector.
    static Vector2
    Vectors.avg(Vector2... values)
    Returns the simple average of the provided vectors.
    static Vector2
    Vectors.avg(Vector2 v1, Vector2 v2)
    Returns the simple average of the two vectors.
    Vector2.clamp(Vector2 min, Vector2 max)
    Between this vector and the provided boundary vectors min and max, this returns a new vector whose components are clamped to respect the range of [min, max].
    Vector2.divide(double s)
    Divides this vector by a scalar component-wise, then returns the resulting vector.
    static Vector2
    Vectors.lerp(Vector2 s, Vector2 e, double t)
    Performs linear interpolation (LERP) between the starting value s and the ending value e.
    Applies the provided mapper function f to each component of this tuple, then returns a new tuple containing the return values of the function f.
    Vector2.max(Vector2 v)
    Between this vector and the provided boundary vector v, this takes the maximum of each corresponding pair of components, then returns a new vector whose components are populated from that of the maximum values between each pair of components.
    static Vector2
    Vectors.max(Vector2... values)
    Returns the collective maximum vector between the provided vectors.
    Between this vector and the provided vector v, this applies the merger function f to each corresponding pair of components, then returns a new vector whose components are populated from the return values of the function f.
    Vector2.min(Vector2 v)
    Between this vector and the provided boundary vector v, this takes the minimum of each corresponding pair of components, then returns a new vector whose components are populated from that of the minimum values between each pair of components.
    static Vector2
    Vectors.min(Vector2... values)
    Returns the collective minimum vector between the provided vectors.
    Vector2.multiply(double s)
    Multiplies this vector by a scalar component-wise, then returns the resulting vector.
    Vector2.multiply(Vector2 v)
    Returns the complex number product between this vector and the provided vector v.
    Vector2.negate()
    Negates all components of this vector, then returns the resulting vector.
    Vector2.normalize()
    Normalizes this vector to have a Euclidean norm (magnitude) of 1.
    Normalizes this vector to have a Euclidean norm (magnitude) of 1.
    Vector2.normalizeOrZero()
    Normalizes this vector ot have a Euclidean norm (magnitude) of 1.
    static Vector2
    Vectors.random2()
    Returns a random unit vector.
    Vector2.rotate(double t)
    Rotates this vector counter-clockwise by the provided angle t.
    Vector2.subtract(double s)
    Subtracts this vector by a scalar component-wise, then returns the resulting vector.
    Vector2.subtract(Vector2 v)
    Subtracts another vector from this vector, then returns the resulting vector.
    static Vector2
    Vectors.sum(Vector2... values)
    Returns the sum of the provided values.
    static Vector2
    Vectors.sum(Vector2 v1, Vector2 v2)
    Returns the sum of the two values.
    Methods in civitas.celestis.math.vector with parameters of type Vector2
    Modifier and Type
    Method
    Description
    Vector2.add(Vector2 v)
    Adds another vector to this vector, then returns the resulting vector.
    static Vector2
    Vectors.avg(Vector2... values)
    Returns the simple average of the provided vectors.
    static Vector2
    Vectors.avg(Vector2 v1, Vector2 v2)
    Returns the simple average of the two vectors.
    Vector2.clamp(Vector2 min, Vector2 max)
    Between this vector and the provided boundary vectors min and max, this returns a new vector whose components are clamped to respect the range of [min, max].
    double
    Vector2.distance(Vector2 v)
    Returns the Euclidean distance between this vector and the provided vector v.
    double
    Vector2.distance2(Vector2 v)
    Returns the squared Euclidean distance between this vector and the provided vector v.
    double
    Returns the Manhattan distance between this vector and the provided vector v.
    double
    Vector2.dot(Vector2 v)
    Returns the dot product between this vector and the provided vector v.
    boolean
    Vector2.equals(Vector2 v)
    Checks for equality between this vector and the provided vector v.
    static boolean
    Vectors.isInRange(Vector2 val, Vector2 min, Vector2 max)
    Checks if the provided value val is within the range of [min, max].
    static Vector2
    Vectors.lerp(Vector2 s, Vector2 e, double t)
    Performs linear interpolation (LERP) between the starting value s and the ending value e.
    Vector2.max(Vector2 v)
    Between this vector and the provided boundary vector v, this takes the maximum of each corresponding pair of components, then returns a new vector whose components are populated from that of the maximum values between each pair of components.
    static Vector2
    Vectors.max(Vector2... values)
    Returns the collective maximum vector between the provided vectors.
    Between this vector and the provided vector v, this applies the merger function f to each corresponding pair of components, then returns a new vector whose components are populated from the return values of the function f.
    Vector2.min(Vector2 v)
    Between this vector and the provided boundary vector v, this takes the minimum of each corresponding pair of components, then returns a new vector whose components are populated from that of the minimum values between each pair of components.
    static Vector2
    Vectors.min(Vector2... values)
    Returns the collective minimum vector between the provided vectors.
    Vector2.multiply(Vector2 v)
    Returns the complex number product between this vector and the provided vector v.
    Normalizes this vector to have a Euclidean norm (magnitude) of 1.
    Vector2.subtract(Vector2 v)
    Subtracts another vector from this vector, then returns the resulting vector.
    static Vector2
    Vectors.sum(Vector2... values)
    Returns the sum of the provided values.
    static Vector2
    Vectors.sum(Vector2 v1, Vector2 v2)
    Returns the sum of the two values.