A three-dimensional vector with 32-bit floating-point precision.
struct
|
Vec3F
|
implements
|
IEquatable<Vec3F>
|
/ \ | X | | Y | | Z | \ /
The serialization helper object for values of Vec3F.
public
static
readonly
field
|
Serializer
|
||
type
|
ITypeSerializerEx<Vec3F>
|
A vector with undefined value.
public
static
readonly
field
|
Undefined
|
||
type
|
Vec3F
|
The zero vector.
public
static
readonly
field
|
Zero
|
||
type
|
Vec3F
|
Checks if this vector has an undefined value.
public
property
|
IsUndefined
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
vector
has
an
undefined
value,
false
if
not. |
Remarks:
A vector is undefined if at least one component is NaN (not-a-number).
Returns the length of this vector.
public
property
|
Length
{
get
}
|
||
type
|
float64
|
||
value
|
|
The vector length. |
Returns the squared length of this vector.
public
property
|
LengthSqr
{
get
}
|
||
type
|
float64
|
||
value
|
|
The squared vector length. |
X-coordinate of vector.
public
readonly
field
|
X
|
||
type
|
float32
|
Y-coordinate of vector.
public
readonly
field
|
Y
|
||
type
|
float32
|
Z-coordinate of vector.
public
readonly
field
|
Z
|
||
type
|
float32
|
Creates a new instance of Vec3F.
public
constructor
|
Vec3F
(float32 x,
float32 y,
float32 z)
|
||
params
|
x
|
X-coordinate of vector. | |
y
|
Y-coordinate of vector. | ||
z
|
Z-coordinate of vector. |
Adds this vector and the given one.
[Pure]
|
||||
public
method
|
Add
(Vec3F v)
|
|||
type
|
Vec3F
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Adds this vector and the given one.
[Pure]
|
||||
public
method
|
Add
(float32 x,
float32 y,
float32 z)
|
|||
type
|
Vec3F
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
The resulting vector. |
Computes the component-wise ceiling of this vector.
[Pure]
|
||||
public
method
|
Ceiling
()
|
|||
type
|
Vec3F
|
|||
returns
|
The resulting vector. |
Computes the cross product between this vector and the given one.
[Pure]
|
||||
public
method
|
Cross
(Vec3F v)
|
|||
type
|
Vec3F
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Computes the cross product between this vector and the given one.
[Pure]
|
||||
public
method
|
Cross
(float32 x,
float32 y,
float32 z)
|
|||
type
|
Vec3F
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
The resulting vector. |
Divides this vector by the given scalar value.
[Pure]
|
||||
public
method
|
Div
(float32 v)
|
|||
type
|
Vec3F
|
|||
params
|
v
|
The scalar value. | ||
returns
|
The resulting vector. |
Computes the dot product between this vector and the given one.
[Pure]
|
||||
public
method
|
Dot
(Vec3F v)
|
|||
type
|
float32
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Computes the dot product between this vector and the given one.
[Pure]
|
||||
public
method
|
Dot
(float32 x,
float32 y,
float32 z)
|
|||
type
|
float32
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
The resulting vector. |
Checks if this vector and the given one are equal.
[Pure]
|
||||
public
method
|
Equals
(Vec3F v)
|
|||
type
|
bool
|
|||
params
|
v
|
The vector. | ||
returns
|
true
if
both
vectors
are
equal,
false
if
they
are
not. |
Checks if this vector and the given one are equal.
[Pure]
|
||||
public
method
|
Equals
(float32 x,
float32 y,
float32 z)
|
|||
type
|
bool
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
true
if
both
vectors
are
equal,
false
if
they
are
not. |
Checks if this vector and the given one are similar but necessarily equal.
[Pure]
|
||||
public
method
|
EqualsAlmost
(Vec3F v)
|
|||
type
|
bool
|
|||
params
|
v
|
The vector. | ||
returns
|
true
if
both
vectors
are
similar,
false
if
they
are
not. |
Checks if this vector and the given one are similar but necessarily equal.
[Pure]
|
||||
public
method
|
EqualsAlmost
(float32 x,
float32 y,
float32 z)
|
|||
type
|
bool
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
true
if
both
vectors
are
similar,
false
if
they
are
not. |
Computes the component-wise floor of this vector.
[Pure]
|
||||
public
method
|
Floor
()
|
|||
type
|
Vec3F
|
|||
returns
|
The resulting vector. |
[Pure]
|
||||
public
override
method
|
GetHashCode
()
|
|||
type
|
int32
|
Computes the component-wise maximum of this vector and the given one.
[Pure]
|
||||
public
method
|
Max
(Vec3F v)
|
|||
type
|
Vec3F
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Computes the component-wise maximum of this vector and the given one.
[Pure]
|
||||
public
method
|
Max
(float32 x,
float32 y,
float32 z)
|
|||
type
|
Vec3F
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
The resulting vector. |
Computes the component-wise minimum of this vector and the given one.
[Pure]
|
||||
public
method
|
Min
(Vec3F v)
|
|||
type
|
Vec3F
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Computes the component-wise minimum of this vector and the given one.
[Pure]
|
||||
public
method
|
Min
(float32 x,
float32 y,
float32 z)
|
|||
type
|
Vec3F
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
The resulting vector. |
Multiplies this vector with the given one.
[Pure]
|
||||
public
method
|
Mul
(Vec3F v)
|
|||
type
|
Vec3F
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Multiplies this vector with the given scalar value.
[Pure]
|
||||
public
method
|
Mul
(float32 v)
|
|||
type
|
Vec3F
|
|||
params
|
v
|
The scalar value. | ||
returns
|
The resulting vector. |
Multiplies this vector with the given one.
[Pure]
|
||||
public
method
|
Mul
(float32 x,
float32 y,
float32 z)
|
|||
type
|
Vec3F
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
The resulting vector. |
Negates this vector.
[Pure]
|
||||
public
method
|
Neg
()
|
|||
type
|
Vec3F
|
|||
returns
|
The resulting vector. |
Normalizes this vector to unit length.
[Pure]
|
||||
public
method
|
Norm
()
|
|||
type
|
Vec3F
|
|||
returns
|
The resulting vector. |
Subtracts the given vector from this one.
[Pure]
|
||||
public
method
|
Sub
(Vec3F v)
|
|||
type
|
Vec3F
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Subtracts the given vector from this one.
[Pure]
|
||||
public
method
|
Sub
(float32 x,
float32 y,
float32 z)
|
|||
type
|
Vec3F
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
z
|
Z-component of vector. | |||
returns
|
The resulting vector. |
Returns a formatted string representation of this vector.
[Pure]
|
||||
public
override
method
|
ToString
()
|
|||
type
|
string
|
|||
returns
|
[not-null]
The
formatted
string
value. |