public final class Vector3Float
extends java.lang.Object
implements net.kyori.examination.Examinable, java.lang.Iterable<java.lang.Float>
| Modifier and Type | Field and Description |
|---|---|
static Vector3Float |
ONE
Constant for
Vector3Float value with
abscissa, ordinate and applicate of 1 one. |
static Vector3Float |
ZERO
Constant for
Vector3Float value with
abscissa, ordinate and applicate of 0 zero. |
| Constructor and Description |
|---|
Vector3Float(float x,
float y,
float z)
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull Vector3Float |
add(float x,
float y,
float z)
|
@NotNull Vector3Float |
add(@NotNull Vector3Float value)
Returns a new
vector result of
adding the given value to this vector. |
@NotNull Vector3Float |
crossProduct(@NotNull Vector3Float vector)
Returns the cross product of this and the given
vector.
|
@NotNull Vector3Float |
divide(float value)
Returns a new
vector result of
dividing this vector by the given scalar value. |
@NotNull Vector3Float |
divide(float x,
float y,
float z)
|
@NotNull Vector3Float |
divide(@NotNull Vector3Float value)
Returns a new
vector result of
dividing this vector by the given value,
one by one (Xa/Xb, Ya/Yb, Za/Zb). |
float |
dot(@NotNull Vector3Float vector)
Returns the dot product of this and the given
vector.
|
boolean |
equals(java.lang.Object o) |
@NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> |
examinableProperties() |
float |
get(@NotNull Axis3D axis)
Returns the component at a specific
Axis3D,
fails if axis is invalid |
int |
hashCode() |
@NotNull java.util.Iterator<java.lang.Float> |
iterator() |
@NotNull Vector3Float |
multiply(float value)
Returns a new
vector result of
multiplying this vector by the given scalar value. |
@NotNull Vector3Float |
multiply(float x,
float y,
float z)
|
@NotNull Vector3Float |
multiply(@NotNull Vector3Float value)
Returns a new
vector result of
multiplying this vector by the given value,
one by one (Xa*Xb, Ya*Yb, Za*Zb). |
@NotNull Vector3Float |
subtract(float x,
float y,
float z)
|
@NotNull Vector3Float |
subtract(@NotNull Vector3Float value)
Returns a new
vector result of
subtracting the given value from this vector. |
float[] |
toArray()
Converts this vector to an array of
float values with X, Y, Z
order. |
java.lang.String |
toString() |
@NotNull Vector3Float |
with(@NotNull Axis3D axis,
float value)
Returns a new
vector which is
the same as this vector, but with one component
updated. |
float |
x()
Returns the "X" component or abscissa
of this vector.
|
@NotNull Vector3Float |
x(float x)
|
float |
y()
Returns the "Y" component or ordinate
of this vector.
|
@NotNull Vector3Float |
y(float y)
|
float |
z()
Returns the "Z" component or applicate
of this vector.
|
@NotNull Vector3Float |
z(float z)
|
public static final Vector3Float ZERO
Vector3Float value with
abscissa, ordinate and applicate of 0 zero.public static final Vector3Float ONE
Vector3Float value with
abscissa, ordinate and applicate of 1 one.public Vector3Float(float x,
float y,
float z)
x - The vector abscissay - The vector ordinatez - The vector applicatepublic float x()
@Contract(value="_ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float x(float x)
x - The new X valuepublic float y()
@Contract(value="_ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float y(float y)
y - The new Y valuepublic float z()
@Contract(value="_ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float z(float z)
z - The new Z value@Contract(value="_, _, _ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float add(float x,
float y,
float z)
x - The value to add to the abscissay - The value to add to the ordinatez - The value to add to the applicate@Contract(value="_ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float add(@NotNull
@NotNull Vector3Float value)
vector result of
adding the given value to this vector.value - The value to add@Contract(value="_, _, _ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float subtract(float x,
float y,
float z)
x - The value to subtract from the abscissay - The value to subtract from the ordinatez - The value to subtract from the applicate@Contract(value="_ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float subtract(@NotNull
@NotNull Vector3Float value)
vector result of
subtracting the given value from this vector.value - The value to subtract@NotNull public @NotNull Vector3Float multiply(float value)
vector result of
multiplying this vector by the given scalar value.value - The scalar value@NotNull public @NotNull Vector3Float multiply(float x, float y, float z)
x - The factor for the abscissay - The factor for the ordinatez - The factor for the applicate@NotNull public @NotNull Vector3Float multiply(@NotNull @NotNull Vector3Float value)
vector result of
multiplying this vector by the given value,
one by one (Xa*Xb, Ya*Yb, Za*Zb).value - The factor vector@Contract(value="_ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float divide(float value)
vector result of
dividing this vector by the given scalar value.value - The divisor@Contract(value="_, _, _ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float divide(float x,
float y,
float z)
x - The divisor for the abscissay - The divisor for the ordinatez - The divisor for the applicate@Contract(value="_ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float divide(@NotNull
@NotNull Vector3Float value)
vector result of
dividing this vector by the given value,
one by one (Xa/Xb, Ya/Yb, Za/Zb).value - The divisor vector@Contract(pure=true)
public float dot(@NotNull
@NotNull Vector3Float vector)
vector - The vector to calculate the dot product with@Contract(value="_ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float crossProduct(@NotNull
@NotNull Vector3Float vector)
vector - The vector to calculate the cross product with@Contract(value="_, _ -> new",
pure=true)
@NotNull
public @NotNull Vector3Float with(@NotNull
@NotNull Axis3D axis,
float value)
vector which is
the same as this vector, but with one component
updated.axis - The axis to updatevalue - The new value for the axispublic float get(@NotNull
@NotNull Axis3D axis)
Axis3D,
fails if axis is invalidaxis - The requested axisjava.lang.IllegalArgumentException - If axis is not X, Y or Zpublic float[] toArray()
float values with X, Y, Z
order.@NotNull public @NotNull java.util.Iterator<java.lang.Float> iterator()
iterator in interface java.lang.Iterable<java.lang.Float>@NotNull public @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
examinableProperties in interface net.kyori.examination.Examinablepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object