pythagoras.d

## Interface IVector4

• ### Method Summary

All Methods
Modifier and Type Method and Description
`Vector4` `abs()`
Absolute-values this vector.
`Vector4` `abs(Vector4 result)`
Absolute-values this vector, storing the result in the supplied object.
`boolean` ```epsilonEquals(IVector4 other, double epsilon)```
Compares this vector to another with the provided epsilon.
`DoubleBuffer` `get(DoubleBuffer buf)`
Populates the supplied buffer with the contents of this vector.
`Vector4` `mult(double v)`
Multiplies this vector by a scalar.
`Vector4` ```mult(double v, Vector4 result)```
Multiplies this vector by a scalar and places the result in the supplied object.
`Vector4` `mult(IMatrix4 matrix)`
Multiplies this vector by a matrix (V * M).
`Vector4` ```mult(IMatrix4 matrix, Vector4 result)```
Multiplies this vector by a matrix (V * M) and stores the result in the object provided.
`Vector4` `negate()`
Negates this vector.
`Vector4` `negate(Vector4 result)`
Negates this vector, storing the result in the supplied object.
`double` `w()`
Returns the w-component of this vector.
`double` `x()`
Returns the x-component of this vector.
`double` `y()`
Returns the y-component of this vector.
`double` `z()`
Returns the z-component of this vector.
• ### Method Detail

• #### x

`double x()`
Returns the x-component of this vector.
• #### y

`double y()`
Returns the y-component of this vector.
• #### z

`double z()`
Returns the z-component of this vector.
• #### w

`double w()`
Returns the w-component of this vector.
• #### get

`DoubleBuffer get(DoubleBuffer buf)`
Populates the supplied buffer with the contents of this vector.
Returns:
a reference to the buffer, for chaining.
• #### epsilonEquals

```boolean epsilonEquals(IVector4 other,
double epsilon)```
Compares this vector to another with the provided epsilon.
• #### negate

`Vector4 negate()`
Negates this vector.
Returns:
a new vector containing the result.
• #### negate

`Vector4 negate(Vector4 result)`
Negates this vector, storing the result in the supplied object.
Returns:
a reference to the result, for chaining.
• #### abs

`Vector4 abs()`
Absolute-values this vector.
Returns:
a new vector containing the result.
• #### abs

`Vector4 abs(Vector4 result)`
Absolute-values this vector, storing the result in the supplied object.
Returns:
a reference to the result, for chaining.
• #### mult

`Vector4 mult(double v)`
Multiplies this vector by a scalar.
Returns:
a new vector containing the result.
• #### mult

```Vector4 mult(double v,
Vector4 result)```
Multiplies this vector by a scalar and places the result in the supplied object.
Returns:
a reference to the result, for chaining.
• #### mult

`Vector4 mult(IMatrix4 matrix)`
Multiplies this vector by a matrix (V * M).
Returns:
a new vector containing the result.
• #### mult

```Vector4 mult(IMatrix4 matrix,
Vector4 result)```
Multiplies this vector by a matrix (V * M) and stores the result in the object provided.
Returns:
a reference to the result vector, for chaining.