Vec4L

Description

struct Tinman.Core.Math.Vectors.Vec4L

A four-dimensional vector with 64-bit integer precision.

/     \
|  X  |
|  Y  |
|  Z  |
|  W  |
\     /

Public / Constants

Zero


public static readonly attribute Zero → (Vec4L)

The zero vector.

Public / Constructors

Vec4​L


public constructor Vec4L → (4)

in : int64

X-coordinate of vector.

in : int64

Y-coordinate of vector.

in : int64

Z-coordinate of vector.

in : int64

W-coordinate of vector.

Creates a new instance of Vec4L.

Public / Methods

Add

2 overloads


[Pure]
public method Add1 → (1)

in : Vec4L

The vector.

returns → Vec4L

The resulting vector.

Adds this vector and the given one.


[Pure]
public method Add2 → (4)

in : int64

X-component of vector.

in : int64

Y-component of vector.

in : int64

Z-component of vector.

in : int64

W-component of vector.

returns → Vec4L

The resulting vector.

Adds this vector and the given one.

Choose


[Pure]
public method Choose → (2)

idx in : int32

The zero-based component index.

opt : int64 = 0

The value to return if idx in is out of range.

returns → int64

The resulting vector.

Chooses a component of this vector.

Dot

2 overloads


[Pure]
public method Dot1 → (1)

in : Vec4L

The vector.

returns → int64

The resulting vector.

Computes the dot product between this vector and the given one.


[Pure]
public method Dot2 → (4)

in : int64

X-component of vector.

in : int64

Y-component of vector.

in : int64

Z-component of vector.

in : int64

W-component of vector.

returns → int64

The resulting vector.

Computes the dot product between this vector and the given one.

Equals

2 overloads


[Pure]
public method Equals2 → (4)

in : int64

X-component of vector.

in : int64

Y-component of vector.

in : int64

Z-component of vector.

in : int64

W-component of vector.

returns → bool

true if both vectors are equal, false if they are not.

Checks if this vector and the given one are equal.

Max

2 overloads


[Pure]
public method Max1 → (1)

in : Vec4L

The vector.

returns → Vec4L

The resulting vector.

Computes the component-wise maximum of this vector and the given one.


[Pure]
public method Max2 → (4)

in : int64

X-component of vector.

in : int64

Y-component of vector.

in : int64

Z-component of vector.

in : int64

W-component of vector.

returns → Vec4L

The resulting vector.

Computes the component-wise maximum of this vector and the given one.

Min

2 overloads


[Pure]
public method Min1 → (1)

in : Vec4L

The vector.

returns → Vec4L

The resulting vector.

Computes the component-wise minimum of this vector and the given one.


[Pure]
public method Min2 → (4)

in : int64

X-component of vector.

in : int64

Y-component of vector.

in : int64

Z-component of vector.

in : int64

W-component of vector.

returns → Vec4L

The resulting vector.

Computes the component-wise minimum of this vector and the given one.

Mul

3 overloads


[Pure]
public method Mul1 → (1)

in : Vec4L

The vector.

returns → Vec4L

The resulting vector.

Multiplies this vector with the given one.


[Pure]
public method Mul2 → (4)

in : int64

X-component of vector.

in : int64

Y-component of vector.

in : int64

Z-component of vector.

in : int64

W-component of vector.

returns → Vec4L

The resulting vector.

Multiplies this vector with the given one.


[Pure]
public method Mul3 → (1)

in : int64

The scalar value.

returns → Vec4L

The resulting vector.

Multiplies this vector with the given scalar value.

Neg


[Pure]
public method Neg → ()

returns → Vec4L

The resulting vector.

Negates this vector.

Shift​Left


[Pure]
public method ShiftLeft → (1)

in : int32

The shift amount.

returns → Vec4L

The resulting vector.

Performs a left bit shift on each component of this vector.

Shift​Right


[Pure]
public method ShiftRight → (1)

in : int32

The shift amount.

returns → Vec4L

The resulting vector.

Performs a right bit shift on each component of this vector.

Sub

2 overloads


[Pure]
public method Sub1 → (1)

in : Vec4L

The vector.

returns → Vec4L

The resulting vector.

Subtracts the given vector from this one.


[Pure]
public method Sub2 → (4)

in : int64

X-component of vector.

in : int64

Y-component of vector.

in : int64

Z-component of vector.

in : int64

W-component of vector.

returns → Vec4L

The resulting vector.

Subtracts the given vector from this one.

Public / Attributes

Length


public attribute Length → (get)

value : float64

[>=0]
The vector length.

Returns the length of this vector.

Length​Sqr


public attribute LengthSqr → (get)

value : float64

[>=0]
The squared vector length.

Returns the squared length of this vector.

W


public readonly attribute W → (int64)

W-coordinate of vector.

X


public readonly attribute X → (int64)

X-coordinate of vector.

Y


public readonly attribute Y → (int64)

Y-coordinate of vector.

Z


public readonly attribute Z → (int64)

Z-coordinate of vector.

Serialization

Serializer


public static readonly attribute Serializer → (ITypeSerializerEx<Vec4L>)

The serialization helper object for values of Vec4L.