Vector Extensions

VectorExtensions Class

Additional methods for Mono.Simd.Vector4f.

Syntax

public static class VectorExtensions

Member Details

Cos Method

Returns the approximate cosine of the four floats in the vector.

Syntax

Parameters

x

A vector of 4 floats.

Returns

The approximate cosine of each element.

Remarks

Requirements

Namespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


CosSlow Method

Returns the cosine each element of the vector.

Syntax

Parameters

v1

A vector of 4 floats.

Returns

The cosine of each element.

Remarks

Requirements

Namespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


SelectWithMask Method

Creates a new vector4f from the given vectors, selecting a component from sourceIfTrue if the corresponding component in the mask is -1 and from sourceIfFalse if 0.

Syntax

Parameters

mask

The mask vector.

sourceIfTrue

The vector containing the elements that are selected if the mask is true.

sourceIfFalse

The vector containing the elements that are selected if the maks is false.

Returns

A new vector with elements selected from the source vectors based on the mask.

Remarks

Requirements

Namespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Sin Method

Returns the approximate sine of the four floats in the vector.

Syntax

Parameters

a

A vector of 4 floats

Returns

A fast approximation of the sine of each of the 4 floats.

Remarks

Requirements

Namespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


SinSlow Method

Returns the sine each element of the vector.

Syntax

Parameters

v1

A vector of 4 floats.

Returns

The sine of each element.

Remarks

Requirements

Namespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


SinZeroPiOverTwo Method

Returns the approximate sine of each element in the vector.

Syntax

Parameters

x

A vector of 4 floats.

Returns

The approximate sine of each element.

Remarks

Requirements

Namespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0



Last updated