Vector4i

Contains the definition of a Vector comprising 4 ints and associated transformations.

@author Richard Greenlees @author Kai Burjack @author Hans Uhlig

struct Vector4i {}

Constructors

this
this(Vector4i v)

Create a new {@link Vector4i} with the same values as <code>v</code>.

this
this(Vector3i v, int w)

Create a new {@link Vector4i} with the first three components from the given <code>v</code> and the given <code>w</code>.

this
this(Vector2i v, int z, int w)

Create a new {@link Vector4i} with the first two components from the given <code>v</code> and the given <code>z</code>, and <code>w</code>.

this
this(Vector4d v, int mode)

Create a new {@link Vector4i} and initialize its components to the rounded value of the given vector.

this
this(int s)

Create a new {@link Vector4i} and initialize all four components with the given value.

this
this(int x, int y, int z, int w)

Create a new {@link Vector4i} with the given component values.

this
this(int[] xyzw)

Create a new {@link Vector4i} and initialize its four components from the first four elements of the given array.

Members

Functions

absolute
Vector4i absolute()

Compute the absolute of each of this vector's components.

absolute
Vector4i absolute(Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
add
Vector4i add(Vector4i v)

Add the supplied vector to this one.

add
Vector4i add(Vector4i v, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
add
Vector4i add(int x, int y, int z, int w)

Increment the components of this vector by the given values.

add
Vector4i add(int x, int y, int z, int w, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
distance
double distance(Vector4i v)
Undocumented in source. Be warned that the author may not have intended to support it.
distance
double distance(int x, int y, int z, int w)
Undocumented in source. Be warned that the author may not have intended to support it.
distanceSquared
int distanceSquared(Vector4i v)
Undocumented in source. Be warned that the author may not have intended to support it.
distanceSquared
int distanceSquared(int x, int y, int z, int w)
Undocumented in source. Be warned that the author may not have intended to support it.
div
Vector4i div(Vector4i v)

Divide this Vector4i component-wise by another Vector4i.

div
Vector4i div(Vector4i v, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
div
Vector4i div(double scalar)

Divide all components of this {@link Vector3i} by the given scalar value.

div
Vector4i div(double scalar, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
div
Vector4i div(int scalar)

Divide all components of this {@link Vector4i} by the given scalar value.

div
Vector4i div(int scalar, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
dot
int dot(Vector4i v)
Undocumented in source. Be warned that the author may not have intended to support it.
equals
bool equals(int x, int y, int z, int w)
Undocumented in source. Be warned that the author may not have intended to support it.
equals
bool equals(Vector4i other)
Undocumented in source. Be warned that the author may not have intended to support it.
get
int get(int component)
Undocumented in source. Be warned that the author may not have intended to support it.
gridDistance
long gridDistance(Vector4i v)
Undocumented in source. Be warned that the author may not have intended to support it.
gridDistance
long gridDistance(int x, int y, int z, int w)
Undocumented in source. Be warned that the author may not have intended to support it.
hashCode
int hashCode()
Undocumented in source. Be warned that the author may not have intended to support it.
length
double length()
Undocumented in source. Be warned that the author may not have intended to support it.
lengthSquared
long lengthSquared()
Undocumented in source. Be warned that the author may not have intended to support it.
max
Vector4i max(Vector4i v)

Set the components of this vector to be the component-wise maximum of this and the other vector.

max
Vector4i max(Vector4i v, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
maxComponent
int maxComponent()
Undocumented in source. Be warned that the author may not have intended to support it.
min
Vector4i min(Vector4i v)

Set the components of this vector to be the component-wise minimum of this and the other vector.

min
Vector4i min(Vector4i v, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
minComponent
int minComponent()
Undocumented in source. Be warned that the author may not have intended to support it.
mul
Vector4i mul(Vector4i v)

Multiply this Vector4i component-wise by another Vector4i.

mul
Vector4i mul(Vector4i v, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mul
Vector4i mul(int scalar)

Multiply all components of this {@link Vector4i} by the given scalar value.

mul
Vector4i mul(int scalar, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
negate
Vector4i negate()

Negate this vector.

negate
Vector4i negate(Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
set
Vector4i set(Vector4i v)

Set this {@link Vector4i} to the values of the given <code>v</code>.

set
Vector4i set(Vector4d v)

Set this {@link Vector4i} to the values of v using {@link RoundingMode#TRUNCATE} rounding. <p> Note that due to the given vector <code>v</code> storing the components in double-precision, there is the possibility to lose precision.

set
Vector4i set(Vector4d v, int mode)

Set this {@link Vector4i} to the values of v using the given {@link RoundingMode}. <p> Note that due to the given vector <code>v</code> storing the components in double-precision, there is the possibility to lose precision.

set
Vector4i set(Vector3i v, int w)

Set the first three components of this to the components of <code>v</code> and the last component to <code>w</code>.

set
Vector4i set(Vector2i v, int z, int w)

Sets the first two components of this to the components of given <code>v</code> and last two components to the given <code>z</code>, and <code>w</code>.

set
Vector4i set(int s)

Set the x, y, z, and w components to the supplied value.

set
Vector4i set(int x, int y, int z, int w)

Set the x, y, z, and w components to the supplied values.

set
Vector4i set(int[] xyzw)

Set the four components of this vector to the first four elements of the given array.

setComponent
Vector4i setComponent(int component, int value)

Set the value of the specified component of this vector.

sub
Vector4i sub(Vector4i v)

Subtract the supplied vector from this one.

sub
Vector4i sub(int x, int y, int z, int w)

Subtract <code>(x, y, z, w)</code> from this.

sub
Vector4i sub(Vector4i v, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
sub
Vector4i sub(int x, int y, int z, int w, Vector4i dest)
Undocumented in source. Be warned that the author may not have intended to support it.
zero
Vector4i zero()

Set all components to zero.

Static functions

distance
double distance(int x1, int y1, int z1, int w1, int x2, int y2, int z2, int w2)

Return the distance between <code>(x1, y1, z1, w1)</code> and <code>(x2, y2, z2, w2)</code>.

distanceSquared
long distanceSquared(int x1, int y1, int z1, int w1, int x2, int y2, int z2, int w2)

Return the squared distance between <code>(x1, y1, z1, w1)</code> and <code>(x2, y2, z2, w2)</code>.

length
double length(int x, int y, int z, int w)

Get the length of a 4-dimensional single-precision vector.

lengthSquared
long lengthSquared(int x, int y, int z, int w)

Get the length squared of a 4-dimensional single-precision vector.

Variables

w
int w;

The w component of the vector.

x
int x;

The x component of the vector.

y
int y;

The y component of the vector.

z
int z;

The z component of the vector.

Meta