Table of Contents

Class math

Namespace
Misaki.HighPerformance.Mathematics
Assembly
Misaki.HighPerformance.Mathematics.dll

A static class to contain various math functions and constants.

public static class math
Inheritance
math
Inherited Members

Fields

DBL_MIN_NORMAL

The smallest positive normal number representable in a double. This is a f64/double precision constant.

public const double DBL_MIN_NORMAL = 2.2250738585072014E-308

Field Value

double

E

The mathematical constant e also known as Euler's number. Approximately 2.72.

public const float E = 2.7182817

Field Value

float

EPSILON

The difference between 1.0f and the next representable f32/single precision number.

Beware: This value is different from System.Single.Epsilon, which is the smallest, positive, denormalized f32/single.

public const float EPSILON = 1.1920929E-07

Field Value

float

EPSILON_DBL

The difference between 1.0 and the next representable f64/double precision number.

Beware: This value is different from System.Double.Epsilon, which is the smallest, positive, denormalized f64/double.

public const double EPSILON_DBL = 2.220446049250313E-16

Field Value

double

E_DBL

The mathematical constant e also known as Euler's number. Approximately 2.72. This is a f64/double precision constant.

public const double E_DBL = 2.718281828459045

Field Value

double

FALSE

public const uint FALSE = 0

Field Value

uint

FLT_MIN_NORMAL

The smallest positive normal number representable in a float.

public const float FLT_MIN_NORMAL = 1.1754944E-38

Field Value

float

INFINITY

Single precision constant for positive infinity.

public const float INFINITY = Infinity

Field Value

float

INFINITY_DBL

Double precision constant for positive infinity.

public const double INFINITY_DBL = Infinity

Field Value

double

LN10

The natural logarithm of 10. Approximately 2.30.

public const float LN10 = 2.3025851

Field Value

float

LN10_DBL

The natural logarithm of 10. Approximately 2.30. This is a f64/double precision constant.

public const double LN10_DBL = 2.302585092994046

Field Value

double

LN2

The natural logarithm of 2. Approximately 0.69.

public const float LN2 = 0.6931472

Field Value

float

LN2_DBL

The natural logarithm of 2. Approximately 0.69. This is a f64/double precision constant.

public const double LN2_DBL = 0.6931471805599453

Field Value

double

LOG10E

The base 10 logarithm of e. Approximately 0.43.

public const float LOG10E = 0.4342945

Field Value

float

LOG10E_DBL

The base 10 logarithm of e. Approximately 0.43. This is a f64/double precision constant.

public const double LOG10E_DBL = 0.4342944819032518

Field Value

double

LOG2E

The base 2 logarithm of e. Approximately 1.44.

public const float LOG2E = 1.442695

Field Value

float

LOG2E_DBL

The base 2 logarithm of e. Approximately 1.44. This is a f64/double precision constant.

public const double LOG2E_DBL = 1.4426950408889634

Field Value

double

NAN

Single precision constant for Not a Number.

NAN is considered unordered, which means all comparisons involving it are false except for not equal (operator !=). As a consequence, NAN == NAN is false but NAN != NAN is true.

Additionally, there are multiple bit representations for Not a Number, so if you must test if your value is NAN, use isnan().

public const float NAN = NaN

Field Value

float

NAN_DBL

Double precision constant for Not a Number.

NAN_DBL is considered unordered, which means all comparisons involving it are false except for not equal (operator !=). As a consequence, NAN_DBL == NAN_DBL is false but NAN_DBL != NAN_DBL is true.

Additionally, there are multiple bit representations for Not a Number, so if you must test if your value is NAN_DBL, use isnan().

public const double NAN_DBL = NaN

Field Value

double

PI

The mathematical constant pi. Approximately 3.14.

public const float PI = 3.1415927

Field Value

float

PI2

The mathematical constant (2 * pi). Approximately 6.28. Also known as TAU.

public const float PI2 = 6.2831855

Field Value

float

PI2_DBL

The mathematical constant (2 * pi). Approximately 6.28. This is a f64/double precision constant. Also known as TAU_DBL.

public const double PI2_DBL = 6.283185307179586

Field Value

double

PIHALF

The mathematical constant (pi / 2). Approximately 1.57.

public const float PIHALF = 1.5707964

Field Value

float

PIHALF_DBL

The mathematical constant (pi / 2). Approximately 1.57. This is a f64/double precision constant.

public const double PIHALF_DBL = 1.5707963267948966

Field Value

double

PI_DBL

The mathematical constant pi. Approximately 3.14. This is a f64/double precision constant.

public const double PI_DBL = 3.141592653589793

Field Value

double

SQRT2

The square root 2. Approximately 1.41.

public const float SQRT2 = 1.4142135

Field Value

float

SQRT2_DBL

The square root 2. Approximately 1.41. This is a f64/double precision constant.

public const double SQRT2_DBL = 1.4142135623730951

Field Value

double

TAU

The mathematical constant tau. Approximately 6.28. Also known as PI2.

public const float TAU = 6.2831855

Field Value

float

TAU_DBL

The mathematical constant tau. Approximately 6.28. This is a f64/double precision constant. Also known as PI2_DBL.

public const double TAU_DBL = 6.283185307179586

Field Value

double

TODEGREES

The conversion constant used to convert radians to degrees. Multiply the radian value by this constant to get degrees.

public const float TODEGREES = 57.29578

Field Value

float

Remarks

Multiplying by this constant is equivalent to using degrees(float).

TODEGREES_DBL

The conversion constant used to convert radians to degrees. Multiply the radian value by this constant to get degrees.

public const double TODEGREES_DBL = 57.29577951308232

Field Value

double

Remarks

Multiplying by this constant is equivalent to using degrees(double).

TORADIANS

The conversion constant used to convert degrees to radians. Multiply the degree value by this constant to get radians.

public const float TORADIANS = 0.017453292

Field Value

float

Remarks

Multiplying by this constant is equivalent to using radians(float).

TORADIANS_DBL

The conversion constant used to convert degrees to radians. Multiply the degree value by this constant to get radians.

public const double TORADIANS_DBL = 0.017453292519943295

Field Value

double

Remarks

Multiplying by this constant is equivalent to using radians(double).

TRUE

public const uint TRUE = 4294967295

Field Value

uint

Methods

BoolToMask(bool)

public static uint BoolToMask(bool b)

Parameters

b bool

Returns

uint

Euler(quaternion, RotationOrder)

Returns the Euler angle representation of the quaternion. The returned angles depend on the specified order to apply the three rotations around the principal axes. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, to get the best performance you should use the specific Euler rotation constructors such as EulerZXY(...).

public static float3 Euler(quaternion q, math.RotationOrder order = RotationOrder.Default)

Parameters

q quaternion

The quaternion to convert to Euler angles.

order math.RotationOrder

The order in which the rotations are applied.

Returns

float3

The Euler angle representation of the quaternion in the specified order.

EulerXYZ(quaternion)

Returns the Euler angle representation of the quaternion following the XYZ rotation order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

public static float3 EulerXYZ(quaternion q)

Parameters

q quaternion

The quaternion to convert to Euler angles.

Returns

float3

The Euler angle representation of the quaternion in XYZ order.

EulerXZY(quaternion)

Returns the Euler angle representation of the quaternion following the XZY rotation order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

public static float3 EulerXZY(quaternion q)

Parameters

q quaternion

The quaternion to convert to Euler angles.

Returns

float3

The Euler angle representation of the quaternion in XZY order.

EulerYXZ(quaternion)

Returns the Euler angle representation of the quaternion following the YXZ rotation order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

public static float3 EulerYXZ(quaternion q)

Parameters

q quaternion

The quaternion to convert to Euler angles.

Returns

float3

The Euler angle representation of the quaternion in YXZ order.

EulerYZX(quaternion)

Returns the Euler angle representation of the quaternion following the YZX rotation order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

public static float3 EulerYZX(quaternion q)

Parameters

q quaternion

The quaternion to convert to Euler angles.

Returns

float3

The Euler angle representation of the quaternion in YZX order.

EulerZXY(quaternion)

Returns the Euler angle representation of the quaternion following the ZXY rotation order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

public static float3 EulerZXY(quaternion q)

Parameters

q quaternion

The quaternion to convert to Euler angles.

Returns

float3

The Euler angle representation of the quaternion in ZXY order.

EulerZYX(quaternion)

Returns the Euler angle representation of the quaternion following the ZYX rotation order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

public static float3 EulerZYX(quaternion q)

Parameters

q quaternion

The quaternion to convert to Euler angles.

Returns

float3

The Euler angle representation of the quaternion in ZYX order.

PackVector256(Vector256<uint>)

public static Vector128<uint> PackVector256(Vector256<uint> vector)

Parameters

vector Vector256<uint>

Returns

Vector128<uint>

UnpackVector128(Vector128<uint>)

public static Vector256<uint> UnpackVector128(Vector128<uint> vector)

Parameters

vector Vector128<uint>

Returns

Vector256<uint>

abs(double2)

Returns the componentwise absolute value of a double2 vector.

public static double2 abs(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise absolute value of the input.

abs(double3)

Returns the componentwise absolute value of a double3 vector.

public static double3 abs(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise absolute value of the input.

abs(double4)

Returns the componentwise absolute value of a double4 vector.

public static double4 abs(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise absolute value of the input.

abs(float2)

Returns the componentwise absolute value of a float2 vector.

public static float2 abs(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise absolute value of the input.

abs(float3)

Returns the componentwise absolute value of a float3 vector.

public static float3 abs(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise absolute value of the input.

abs(float4)

Returns the componentwise absolute value of a float4 vector.

public static float4 abs(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise absolute value of the input.

abs(int2)

Returns the componentwise absolute value of a int2 vector.

public static int2 abs(int2 x)

Parameters

x int2

Input value.

Returns

int2

The componentwise absolute value of the input.

abs(int3)

Returns the componentwise absolute value of a int3 vector.

public static int3 abs(int3 x)

Parameters

x int3

Input value.

Returns

int3

The componentwise absolute value of the input.

abs(int4)

Returns the componentwise absolute value of a int4 vector.

public static int4 abs(int4 x)

Parameters

x int4

Input value.

Returns

int4

The componentwise absolute value of the input.

abs(double)

Returns the absolute value of a double value.

public static double abs(double x)

Parameters

x double

Input value.

Returns

double

The absolute value of the input.

abs(int)

Returns the absolute value of a int value.

public static int abs(int x)

Parameters

x int

Input value.

Returns

int

The absolute value of the input.

abs(long)

Returns the absolute value of a long value.

public static long abs(long x)

Parameters

x long

Input value.

Returns

long

The absolute value of the input.

abs(float)

Returns the absolute value of a float value.

public static float abs(float x)

Parameters

x float

Input value.

Returns

float

The absolute value of the input.

acos(double2)

Returns the componentwise arccosine of a double2 vector.

public static double2 acos(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise arccosine of the input.

acos(double3)

Returns the componentwise arccosine of a double3 vector.

public static double3 acos(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise arccosine of the input.

acos(double4)

Returns the componentwise arccosine of a double4 vector.

public static double4 acos(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise arccosine of the input.

acos(float2)

Returns the componentwise arccosine of a float2 vector.

public static float2 acos(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise arccosine of the input.

acos(float3)

Returns the componentwise arccosine of a float3 vector.

public static float3 acos(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise arccosine of the input.

acos(float4)

Returns the componentwise arccosine of a float4 vector.

public static float4 acos(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise arccosine of the input.

acos(double)

Returns the arccosine of a double value.

public static double acos(double x)

Parameters

x double

Input value.

Returns

double

The arccosine of the input.

acos(float)

Returns the arccosine of a float value.

public static float acos(float x)

Parameters

x float

Input value.

Returns

float

The arccosine of the input.

all(bool2)

Returns true if all components of the input bool2 vector are true, false otherwise.

public static bool all(bool2 x)

Parameters

x bool2

Vector of values to compare.

Returns

bool

True if all the components of x are true, false otherwise.

all(bool3)

Returns true if all components of the input bool3 vector are true, false otherwise.

public static bool all(bool3 x)

Parameters

x bool3

Vector of values to compare.

Returns

bool

True if all the components of x are true, false otherwise.

all(bool4)

Returns true if all components of the input bool4 vector are true, false otherwise.

public static bool all(bool4 x)

Parameters

x bool4

Vector of values to compare.

Returns

bool

True if all the components of x are true, false otherwise.

all(double2)

Returns true if all components of the input double2 vector are non-zero, false otherwise.

public static bool all(double2 x)

Parameters

x double2

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(double3)

Returns true if all components of the input double3 vector are non-zero, false otherwise.

public static bool all(double3 x)

Parameters

x double3

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(double4)

Returns true if all components of the input double4 vector are non-zero, false otherwise.

public static bool all(double4 x)

Parameters

x double4

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(float2)

Returns true if all components of the input float2 vector are non-zero, false otherwise.

public static bool all(float2 x)

Parameters

x float2

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(float3)

Returns true if all components of the input float3 vector are non-zero, false otherwise.

public static bool all(float3 x)

Parameters

x float3

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(float4)

Returns true if all components of the input float4 vector are non-zero, false otherwise.

public static bool all(float4 x)

Parameters

x float4

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(int2)

Returns true if all components of the input int2 vector are non-zero, false otherwise.

public static bool all(int2 x)

Parameters

x int2

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(int3)

Returns true if all components of the input int3 vector are non-zero, false otherwise.

public static bool all(int3 x)

Parameters

x int3

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(int4)

Returns true if all components of the input int4 vector are non-zero, false otherwise.

public static bool all(int4 x)

Parameters

x int4

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(uint2)

Returns true if all components of the input uint2 vector are non-zero, false otherwise.

public static bool all(uint2 x)

Parameters

x uint2

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(uint3)

Returns true if all components of the input uint3 vector are non-zero, false otherwise.

public static bool all(uint3 x)

Parameters

x uint3

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

all(uint4)

Returns true if all components of the input uint4 vector are non-zero, false otherwise.

public static bool all(uint4 x)

Parameters

x uint4

Vector of values to compare.

Returns

bool

True if all the components of x are non-zero, false otherwise.

angle(quaternion, quaternion)

Returns the angle in radians between two unit quaternions.

public static float angle(quaternion q1, quaternion q2)

Parameters

q1 quaternion

The first quaternion.

q2 quaternion

The second quaternion.

Returns

float

The angle between two unit quaternions.

any(bool2)

Returns true if any component of the input bool2 vector is true, false otherwise.

public static bool any(bool2 x)

Parameters

x bool2

Vector of values to compare.

Returns

bool

True if any the components of x are true, false otherwise.

any(bool3)

Returns true if any component of the input bool3 vector is true, false otherwise.

public static bool any(bool3 x)

Parameters

x bool3

Vector of values to compare.

Returns

bool

True if any the components of x are true, false otherwise.

any(bool4)

Returns true if any components of the input bool4 vector is true, false otherwise.

public static bool any(bool4 x)

Parameters

x bool4

Vector of values to compare.

Returns

bool

True if any the components of x are true, false otherwise.

any(double2)

Returns true if any component of the input double2 vector is non-zero, false otherwise.

public static bool any(double2 x)

Parameters

x double2

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(double3)

Returns true if any component of the input double3 vector is non-zero, false otherwise.

public static bool any(double3 x)

Parameters

x double3

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(double4)

Returns true if any component of the input double4 vector is non-zero, false otherwise.

public static bool any(double4 x)

Parameters

x double4

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(float2)

Returns true if any component of the input float2 vector is non-zero, false otherwise.

public static bool any(float2 x)

Parameters

x float2

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(float3)

Returns true if any component of the input float3 vector is non-zero, false otherwise.

public static bool any(float3 x)

Parameters

x float3

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(float4)

Returns true if any component of the input float4 vector is non-zero, false otherwise.

public static bool any(float4 x)

Parameters

x float4

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(int2)

Returns true if any component of the input int2 vector is non-zero, false otherwise.

public static bool any(int2 x)

Parameters

x int2

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(int3)

Returns true if any component of the input int3 vector is non-zero, false otherwise.

public static bool any(int3 x)

Parameters

x int3

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(int4)

Returns true if any components of the input int4 vector is non-zero, false otherwise.

public static bool any(int4 x)

Parameters

x int4

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(uint2)

Returns true if any component of the input uint2 vector is non-zero, false otherwise.

public static bool any(uint2 x)

Parameters

x uint2

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(uint3)

Returns true if any component of the input uint3 vector is non-zero, false otherwise.

public static bool any(uint3 x)

Parameters

x uint3

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

any(uint4)

Returns true if any components of the input uint4 vector is non-zero, false otherwise.

public static bool any(uint4 x)

Parameters

x uint4

Vector of values to compare.

Returns

bool

True if any the components of x are non-zero, false otherwise.

asdouble(long)

Returns the bit pattern of a long as a double.

public static double asdouble(long x)

Parameters

x long

The long bits to copy.

Returns

double

The double with the same bit pattern as the input.

asdouble(ulong)

Returns the bit pattern of a ulong as a double.

public static double asdouble(ulong x)

Parameters

x ulong

The ulong bits to copy.

Returns

double

The double with the same bit pattern as the input.

asfloat(int2)

Returns the bit pattern of an int2 as a float2.

public static float2 asfloat(int2 x)

Parameters

x int2

The int2 bits to copy.

Returns

float2

The float2 with the same bit pattern as the input.

asfloat(int3)

Returns the bit pattern of an int3 as a float3.

public static float3 asfloat(int3 x)

Parameters

x int3

The int3 bits to copy.

Returns

float3

The float3 with the same bit pattern as the input.

asfloat(int4)

Returns the bit pattern of an int4 as a float4.

public static float4 asfloat(int4 x)

Parameters

x int4

The int4 bits to copy.

Returns

float4

The float4 with the same bit pattern as the input.

asfloat(uint2)

Returns the bit pattern of a uint2 as a float2.

public static float2 asfloat(uint2 x)

Parameters

x uint2

The uint2 bits to copy.

Returns

float2

The float2 with the same bit pattern as the input.

asfloat(uint3)

Returns the bit pattern of a uint3 as a float3.

public static float3 asfloat(uint3 x)

Parameters

x uint3

The uint3 bits to copy.

Returns

float3

The float3 with the same bit pattern as the input.

asfloat(uint4)

Returns the bit pattern of a uint4 as a float4.

public static float4 asfloat(uint4 x)

Parameters

x uint4

The uint4 bits to copy.

Returns

float4

The float4 with the same bit pattern as the input.

asfloat(int)

Returns the bit pattern of an int as a float.

public static float asfloat(int x)

Parameters

x int

The int bits to copy.

Returns

float

The float with the same bit pattern as the input.

asfloat(uint)

Returns the bit pattern of a uint as a float.

public static float asfloat(uint x)

Parameters

x uint

The uint bits to copy.

Returns

float

The float with the same bit pattern as the input.

asin(double2)

Returns the componentwise arcsine of a double2 vector.

public static double2 asin(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise arcsine of the input.

asin(double3)

Returns the componentwise arcsine of a double3 vector.

public static double3 asin(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise arcsine of the input.

asin(double4)

Returns the componentwise arcsine of a double4 vector.

public static double4 asin(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise arcsine of the input.

asin(float2)

Returns the componentwise arcsine of a float2 vector.

public static float2 asin(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise arcsine of the input.

asin(float3)

Returns the componentwise arcsine of a float3 vector.

public static float3 asin(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise arcsine of the input.

asin(float4)

Returns the componentwise arcsine of a float4 vector.

public static float4 asin(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise arcsine of the input.

asin(double)

Returns the arcsine of a double value.

public static double asin(double x)

Parameters

x double

Input value.

Returns

double

The arcsine of the input.

asin(float)

Returns the arcsine of a float value.

public static float asin(float x)

Parameters

x float

Input value.

Returns

float

The arcsine of the input.

asint(float2)

Returns the bit pattern of a float2 as an int2.

public static int2 asint(float2 x)

Parameters

x float2

The float2 bits to copy.

Returns

int2

The int2 with the same bit pattern as the input.

asint(float3)

Returns the bit pattern of a float3 as an int3.

public static int3 asint(float3 x)

Parameters

x float3

The float3 bits to copy.

Returns

int3

The int3 with the same bit pattern as the input.

asint(float4)

Returns the bit pattern of a float4 as an int4.

public static int4 asint(float4 x)

Parameters

x float4

The float4 bits to copy.

Returns

int4

The int4 with the same bit pattern as the input.

asint(uint2)

Returns the bit pattern of a uint2 as an int2.

public static int2 asint(uint2 x)

Parameters

x uint2

The uint2 bits to copy.

Returns

int2

The int2 with the same bit pattern as the input.

asint(uint3)

Returns the bit pattern of a uint3 as an int3.

public static int3 asint(uint3 x)

Parameters

x uint3

The uint3 bits to copy.

Returns

int3

The int3 with the same bit pattern as the input.

asint(uint4)

Returns the bit pattern of a uint4 as an int4.

public static int4 asint(uint4 x)

Parameters

x uint4

The uint4 bits to copy.

Returns

int4

The int4 with the same bit pattern as the input.

asint(float)

Returns the bit pattern of a float as an int.

public static int asint(float x)

Parameters

x float

The float bits to copy.

Returns

int

The int with the same bit pattern as the input.

asint(uint)

Returns the bit pattern of a uint as an int.

public static int asint(uint x)

Parameters

x uint

The uint bits to copy.

Returns

int

The int with the same bit pattern as the input.

aslong(double)

Returns the bit pattern of a double as a long.

public static long aslong(double x)

Parameters

x double

The double bits to copy.

Returns

long

The long with the same bit pattern as the input.

aslong(ulong)

Returns the bit pattern of a ulong as a long.

public static long aslong(ulong x)

Parameters

x ulong

The ulong bits to copy.

Returns

long

The long with the same bit pattern as the input.

asuint(float2)

Returns the bit pattern of a float2 as a uint2.

public static uint2 asuint(float2 x)

Parameters

x float2

The float2 bits to copy.

Returns

uint2

The uint2 with the same bit pattern as the input.

asuint(float3)

Returns the bit pattern of a float3 as a uint3.

public static uint3 asuint(float3 x)

Parameters

x float3

The float3 bits to copy.

Returns

uint3

The uint3 with the same bit pattern as the input.

asuint(float4)

Returns the bit pattern of a float4 as a uint4.

public static uint4 asuint(float4 x)

Parameters

x float4

The float4 bits to copy.

Returns

uint4

The uint4 with the same bit pattern as the input.

asuint(int2)

Returns the bit pattern of an int2 as a uint2.

public static uint2 asuint(int2 x)

Parameters

x int2

The int2 bits to copy.

Returns

uint2

The uint2 with the same bit pattern as the input.

asuint(int3)

Returns the bit pattern of an int3 as a uint3.

public static uint3 asuint(int3 x)

Parameters

x int3

The int3 bits to copy.

Returns

uint3

The uint3 with the same bit pattern as the input.

asuint(int4)

Returns the bit pattern of an int4 as a uint4.

public static uint4 asuint(int4 x)

Parameters

x int4

The int4 bits to copy.

Returns

uint4

The uint4 with the same bit pattern as the input.

asuint(int)

Returns the bit pattern of an int as a uint.

public static uint asuint(int x)

Parameters

x int

The int bits to copy.

Returns

uint

The uint with the same bit pattern as the input.

asuint(float)

Returns the bit pattern of a float as a uint.

public static uint asuint(float x)

Parameters

x float

The float bits to copy.

Returns

uint

The uint with the same bit pattern as the input.

asulong(double)

Returns the bit pattern of a double as a ulong.

public static ulong asulong(double x)

Parameters

x double

The double bits to copy.

Returns

ulong

The ulong with the same bit pattern as the input.

asulong(long)

Returns the bit pattern of a long as a ulong.

public static ulong asulong(long x)

Parameters

x long

The long bits to copy.

Returns

ulong

The ulong with the same bit pattern as the input.

atan(double2)

Returns the componentwise arctangent of a double2 vector.

public static double2 atan(double2 x)

Parameters

x double2

A tangent value, usually the ratio y/x on the unit circle.

Returns

double2

The componentwise arctangent of the input, in radians.

atan(double3)

Returns the componentwise arctangent of a double3 vector.

public static double3 atan(double3 x)

Parameters

x double3

A tangent value, usually the ratio y/x on the unit circle.

Returns

double3

The componentwise arctangent of the input, in radians.

atan(double4)

Returns the componentwise arctangent of a double4 vector.

public static double4 atan(double4 x)

Parameters

x double4

A tangent value, usually the ratio y/x on the unit circle.

Returns

double4

The componentwise arctangent of the input, in radians.

atan(float2)

Returns the componentwise arctangent of a float2 vector.

public static float2 atan(float2 x)

Parameters

x float2

A tangent value, usually the ratio y/x on the unit circle.

Returns

float2

The componentwise arctangent of the input, in radians.

atan(float3)

Returns the componentwise arctangent of a float3 vector.

public static float3 atan(float3 x)

Parameters

x float3

A tangent value, usually the ratio y/x on the unit circle.

Returns

float3

The componentwise arctangent of the input, in radians.

atan(float4)

Returns the componentwise arctangent of a float4 vector.

public static float4 atan(float4 x)

Parameters

x float4

A tangent value, usually the ratio y/x on the unit circle.

Returns

float4

The componentwise arctangent of the input, in radians.

atan(double)

Returns the arctangent of a double value.

public static double atan(double x)

Parameters

x double

A tangent value, usually the ratio y/x on the unit circle.

Returns

double

The arctangent of the input, in radians.

atan(float)

Returns the arctangent of a float value.

public static float atan(float x)

Parameters

x float

A tangent value, usually the ratio y/x on the unit circle.

Returns

float

The arctangent of the input, in radians.

atan2(double2, double2)

Returns the 2-argument arctangent of a pair of double2 vectors.

public static double2 atan2(double2 y, double2 x)

Parameters

y double2

Numerator of the ratio y/x, usually the y component on the unit circle.

x double2

Denominator of the ratio y/x, usually the x component on the unit circle.

Returns

double2

The componentwise arctangent of the ratio y/x, in radians.

atan2(double3, double3)

Returns the 2-argument arctangent of a pair of double3 vectors.

public static double3 atan2(double3 y, double3 x)

Parameters

y double3

Numerator of the ratio y/x, usually the y component on the unit circle.

x double3

Denominator of the ratio y/x, usually the x component on the unit circle.

Returns

double3

The componentwise arctangent of the ratio y/x, in radians.

atan2(double4, double4)

Returns the 2-argument arctangent of a pair of double4 vectors.

public static double4 atan2(double4 y, double4 x)

Parameters

y double4

Numerator of the ratio y/x, usually the y component on the unit circle.

x double4

Denominator of the ratio y/x, usually the x component on the unit circle.

Returns

double4

The componentwise arctangent of the ratio y/x, in radians.

atan2(float2, float2)

Returns the componentwise 2-argument arctangent of a pair of floats2 vectors.

public static float2 atan2(float2 y, float2 x)

Parameters

y float2

Numerator of the ratio y/x, usually the y component on the unit circle.

x float2

Denominator of the ratio y/x, usually the x component on the unit circle.

Returns

float2

The componentwise arctangent of the ratio y/x, in radians.

atan2(float3, float3)

Returns the componentwise 2-argument arctangent of a pair of floats3 vectors.

public static float3 atan2(float3 y, float3 x)

Parameters

y float3

Numerator of the ratio y/x, usually the y component on the unit circle.

x float3

Denominator of the ratio y/x, usually the x component on the unit circle.

Returns

float3

The componentwise arctangent of the ratio y/x, in radians.

atan2(float4, float4)

Returns the componentwise 2-argument arctangent of a pair of floats4 vectors.

public static float4 atan2(float4 y, float4 x)

Parameters

y float4

Numerator of the ratio y/x, usually the y component on the unit circle.

x float4

Denominator of the ratio y/x, usually the x component on the unit circle.

Returns

float4

The componentwise arctangent of the ratio y/x, in radians.

atan2(double, double)

Returns the 2-argument arctangent of a pair of double values.

public static double atan2(double y, double x)

Parameters

y double

Numerator of the ratio y/x, usually the y component on the unit circle.

x double

Denominator of the ratio y/x, usually the x component on the unit circle.

Returns

double

The arctangent of the ratio y/x, in radians.

atan2(float, float)

Returns the 2-argument arctangent of a pair of float values.

public static float atan2(float y, float x)

Parameters

y float

Numerator of the ratio y/x, usually the y component on the unit circle.

x float

Denominator of the ratio y/x, usually the x component on the unit circle.

Returns

float

The arctangent of the ratio y/x, in radians.

back()

Unity's back axis (0, 0, -1).

public static float3 back()

Returns

float3

The back axis.

Remarks

bitmask(bool4)

Returns a bitmask representation of a bool4. Storing one 1 bit per component in LSB order, from lower to higher bits (so 4 bits in total). The component x is stored at bit 0, The component y is stored at bit 1, The component z is stored at bit 2, The component w is stored at bit 3 The bool4(x = true, y = true, z = false, w = true) would produce the value 1011 = 0xB

public static int bitmask(bool4 value)

Parameters

value bool4

The input bool4 to calculate the bitmask for

Returns

int

A bitmask representation of the bool4, in LSB order

bool2(bool2)

public static bool2 bool2(bool2 xy)

Parameters

xy bool2

Returns

bool2

bool2(double2)

public static bool2 bool2(double2 v)

Parameters

v double2

Returns

bool2

bool2(float2)

public static bool2 bool2(float2 v)

Parameters

v float2

Returns

bool2

bool2(int2)

public static bool2 bool2(int2 v)

Parameters

v int2

Returns

bool2

bool2(uint2)

public static bool2 bool2(uint2 v)

Parameters

v uint2

Returns

bool2

bool2(uint)

public static bool2 bool2(uint value)

Parameters

value uint

Returns

bool2

bool2(uint, uint)

public static bool2 bool2(uint x, uint y)

Parameters

x uint
y uint

Returns

bool2

bool2x2(bool2)

public static bool2x2 bool2x2(bool2 value)

Parameters

value bool2

Returns

bool2x2

bool2x2(bool2, bool2)

public static bool2x2 bool2x2(bool2 c0, bool2 c1)

Parameters

c0 bool2
c1 bool2

Returns

bool2x2

bool2x2(uint)

public static bool2x2 bool2x2(uint value)

Parameters

value uint

Returns

bool2x2

bool2x2(uint, uint, uint, uint)

public static bool2x2 bool2x2(uint m00, uint m01, uint m10, uint m11)

Parameters

m00 uint
m01 uint
m10 uint
m11 uint

Returns

bool2x2

bool2x3(bool2)

public static bool2x3 bool2x3(bool2 value)

Parameters

value bool2

Returns

bool2x3

bool2x3(bool2, bool2, bool2)

public static bool2x3 bool2x3(bool2 c0, bool2 c1, bool2 c2)

Parameters

c0 bool2
c1 bool2
c2 bool2

Returns

bool2x3

bool2x3(uint)

public static bool2x3 bool2x3(uint value)

Parameters

value uint

Returns

bool2x3

bool2x3(uint, uint, uint, uint, uint, uint)

public static bool2x3 bool2x3(uint m00, uint m01, uint m02, uint m10, uint m11, uint m12)

Parameters

m00 uint
m01 uint
m02 uint
m10 uint
m11 uint
m12 uint

Returns

bool2x3

bool2x4(bool2)

public static bool2x4 bool2x4(bool2 value)

Parameters

value bool2

Returns

bool2x4

bool2x4(bool2, bool2, bool2, bool2)

public static bool2x4 bool2x4(bool2 c0, bool2 c1, bool2 c2, bool2 c3)

Parameters

c0 bool2
c1 bool2
c2 bool2
c3 bool2

Returns

bool2x4

bool2x4(uint)

public static bool2x4 bool2x4(uint value)

Parameters

value uint

Returns

bool2x4

bool2x4(uint, uint, uint, uint, uint, uint, uint, uint)

public static bool2x4 bool2x4(uint m00, uint m01, uint m02, uint m03, uint m10, uint m11, uint m12, uint m13)

Parameters

m00 uint
m01 uint
m02 uint
m03 uint
m10 uint
m11 uint
m12 uint
m13 uint

Returns

bool2x4

bool3(bool2, uint)

public static bool3 bool3(bool2 xy, uint z)

Parameters

xy bool2
z uint

Returns

bool3

bool3(bool3)

public static bool3 bool3(bool3 xyz)

Parameters

xyz bool3

Returns

bool3

bool3(double3)

public static bool3 bool3(double3 v)

Parameters

v double3

Returns

bool3

bool3(float3)

public static bool3 bool3(float3 v)

Parameters

v float3

Returns

bool3

bool3(int3)

public static bool3 bool3(int3 v)

Parameters

v int3

Returns

bool3

bool3(uint3)

public static bool3 bool3(uint3 v)

Parameters

v uint3

Returns

bool3

bool3(uint)

public static bool3 bool3(uint value)

Parameters

value uint

Returns

bool3

bool3(uint, bool2)

public static bool3 bool3(uint x, bool2 yz)

Parameters

x uint
yz bool2

Returns

bool3

bool3(uint, uint, uint)

public static bool3 bool3(uint x, uint y, uint z)

Parameters

x uint
y uint
z uint

Returns

bool3

bool3x2(bool3)

public static bool3x2 bool3x2(bool3 value)

Parameters

value bool3

Returns

bool3x2

bool3x2(bool3, bool3)

public static bool3x2 bool3x2(bool3 c0, bool3 c1)

Parameters

c0 bool3
c1 bool3

Returns

bool3x2

bool3x2(uint)

public static bool3x2 bool3x2(uint value)

Parameters

value uint

Returns

bool3x2

bool3x2(uint, uint, uint, uint, uint, uint)

public static bool3x2 bool3x2(uint m00, uint m01, uint m10, uint m11, uint m20, uint m21)

Parameters

m00 uint
m01 uint
m10 uint
m11 uint
m20 uint
m21 uint

Returns

bool3x2

bool3x3(bool3)

public static bool3x3 bool3x3(bool3 value)

Parameters

value bool3

Returns

bool3x3

bool3x3(bool3, bool3, bool3)

public static bool3x3 bool3x3(bool3 c0, bool3 c1, bool3 c2)

Parameters

c0 bool3
c1 bool3
c2 bool3

Returns

bool3x3

bool3x3(uint)

public static bool3x3 bool3x3(uint value)

Parameters

value uint

Returns

bool3x3

bool3x3(uint, uint, uint, uint, uint, uint, uint, uint, uint)

public static bool3x3 bool3x3(uint m00, uint m01, uint m02, uint m10, uint m11, uint m12, uint m20, uint m21, uint m22)

Parameters

m00 uint
m01 uint
m02 uint
m10 uint
m11 uint
m12 uint
m20 uint
m21 uint
m22 uint

Returns

bool3x3

bool3x4(bool3)

public static bool3x4 bool3x4(bool3 value)

Parameters

value bool3

Returns

bool3x4

bool3x4(bool3, bool3, bool3, bool3)

public static bool3x4 bool3x4(bool3 c0, bool3 c1, bool3 c2, bool3 c3)

Parameters

c0 bool3
c1 bool3
c2 bool3
c3 bool3

Returns

bool3x4

bool3x4(uint)

public static bool3x4 bool3x4(uint value)

Parameters

value uint

Returns

bool3x4

bool3x4(uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint)

public static bool3x4 bool3x4(uint m00, uint m01, uint m02, uint m03, uint m10, uint m11, uint m12, uint m13, uint m20, uint m21, uint m22, uint m23)

Parameters

m00 uint
m01 uint
m02 uint
m03 uint
m10 uint
m11 uint
m12 uint
m13 uint
m20 uint
m21 uint
m22 uint
m23 uint

Returns

bool3x4

bool4(bool2, bool2)

public static bool4 bool4(bool2 xy, bool2 zw)

Parameters

xy bool2
zw bool2

Returns

bool4

bool4(bool2, uint, uint)

public static bool4 bool4(bool2 xy, uint z, uint w)

Parameters

xy bool2
z uint
w uint

Returns

bool4

bool4(bool3, uint)

public static bool4 bool4(bool3 xyz, uint w)

Parameters

xyz bool3
w uint

Returns

bool4

bool4(double4)

public static bool4 bool4(double4 v)

Parameters

v double4

Returns

bool4

bool4(float4)

public static bool4 bool4(float4 v)

Parameters

v float4

Returns

bool4

bool4(int4)

public static bool4 bool4(int4 v)

Parameters

v int4

Returns

bool4

bool4(uint4)

public static bool4 bool4(uint4 v)

Parameters

v uint4

Returns

bool4

bool4(uint)

public static bool4 bool4(uint value)

Parameters

value uint

Returns

bool4

bool4(uint, bool2, uint)

public static bool4 bool4(uint x, bool2 yz, uint w)

Parameters

x uint
yz bool2
w uint

Returns

bool4

bool4(uint, bool3)

public static bool4 bool4(uint x, bool3 yzw)

Parameters

x uint
yzw bool3

Returns

bool4

bool4(uint, uint, bool2)

public static bool4 bool4(uint x, uint y, bool2 zw)

Parameters

x uint
y uint
zw bool2

Returns

bool4

bool4(uint, uint, uint, uint)

public static bool4 bool4(uint x, uint y, uint z, uint w)

Parameters

x uint
y uint
z uint
w uint

Returns

bool4

bool4x2(bool4)

public static bool4x2 bool4x2(bool4 value)

Parameters

value bool4

Returns

bool4x2

bool4x2(bool4, bool4)

public static bool4x2 bool4x2(bool4 c0, bool4 c1)

Parameters

c0 bool4
c1 bool4

Returns

bool4x2

bool4x2(uint)

public static bool4x2 bool4x2(uint value)

Parameters

value uint

Returns

bool4x2

bool4x2(uint, uint, uint, uint, uint, uint, uint, uint)

public static bool4x2 bool4x2(uint m00, uint m01, uint m10, uint m11, uint m20, uint m21, uint m30, uint m31)

Parameters

m00 uint
m01 uint
m10 uint
m11 uint
m20 uint
m21 uint
m30 uint
m31 uint

Returns

bool4x2

bool4x3(bool4)

public static bool4x3 bool4x3(bool4 value)

Parameters

value bool4

Returns

bool4x3

bool4x3(bool4, bool4, bool4)

public static bool4x3 bool4x3(bool4 c0, bool4 c1, bool4 c2)

Parameters

c0 bool4
c1 bool4
c2 bool4

Returns

bool4x3

bool4x3(uint)

public static bool4x3 bool4x3(uint value)

Parameters

value uint

Returns

bool4x3

bool4x3(uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint)

public static bool4x3 bool4x3(uint m00, uint m01, uint m02, uint m10, uint m11, uint m12, uint m20, uint m21, uint m22, uint m30, uint m31, uint m32)

Parameters

m00 uint
m01 uint
m02 uint
m10 uint
m11 uint
m12 uint
m20 uint
m21 uint
m22 uint
m30 uint
m31 uint
m32 uint

Returns

bool4x3

bool4x4(bool4)

public static bool4x4 bool4x4(bool4 value)

Parameters

value bool4

Returns

bool4x4

bool4x4(bool4, bool4, bool4, bool4)

public static bool4x4 bool4x4(bool4 c0, bool4 c1, bool4 c2, bool4 c3)

Parameters

c0 bool4
c1 bool4
c2 bool4
c3 bool4

Returns

bool4x4

bool4x4(uint)

public static bool4x4 bool4x4(uint value)

Parameters

value uint

Returns

bool4x4

bool4x4(uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint)

public static bool4x4 bool4x4(uint m00, uint m01, uint m02, uint m03, uint m10, uint m11, uint m12, uint m13, uint m20, uint m21, uint m22, uint m23, uint m30, uint m31, uint m32, uint m33)

Parameters

m00 uint
m01 uint
m02 uint
m03 uint
m10 uint
m11 uint
m12 uint
m13 uint
m20 uint
m21 uint
m22 uint
m23 uint
m30 uint
m31 uint
m32 uint
m33 uint

Returns

bool4x4

ceil(double2)

Returns the result of rounding each component of a double2 vector value up to the nearest integral value greater or equal to the original value.

public static double2 ceil(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise round up to nearest integral value of the input.

ceil(double3)

Returns the result of rounding each component of a double3 vector value up to the nearest integral value greater or equal to the original value..

public static double3 ceil(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise round up to nearest integral value of the input.

ceil(double4)

Returns the result of rounding each component of a double4 vector value up to the nearest integral value greater or equal to the original value.

public static double4 ceil(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise round up to nearest integral value of the input.

ceil(float2)

Returns the result of rounding each component of a float2 vector value up to the nearest value greater or equal to the original value.

public static float2 ceil(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise round up to nearest integral value of the input.

ceil(float3)

Returns the result of rounding each component of a float3 vector value up to the nearest value greater or equal to the original value.

public static float3 ceil(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise round up to nearest integral value of the input.

ceil(float4)

Returns the result of rounding each component of a float4 vector value up to the nearest value greater or equal to the original value.

public static float4 ceil(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise round up to nearest integral value of the input.

ceil(double)

Returns the result of rounding a double value up to the nearest greater integral value greater or equal to the original value.

public static double ceil(double x)

Parameters

x double

Input value.

Returns

double

The round up to nearest integral value of the input.

ceil(float)

Returns the result of rounding a float value up to the nearest integral value greater or equal to the original value.

public static float ceil(float x)

Parameters

x float

Input value.

Returns

float

The round up to nearest integral value of the input.

ceillog2(int2)

Computes the componentwise ceiling of the base-2 logarithm of x.

public static int2 ceillog2(int2 x)

Parameters

x int2

int2 to be used as input.

Returns

int2

Componentwise ceiling of the base-2 logarithm of x.

Remarks

Components of x must be greater than 0, otherwise the result for that component is undefined.

ceillog2(int3)

Computes the componentwise ceiling of the base-2 logarithm of x.

public static int3 ceillog2(int3 x)

Parameters

x int3

int3 to be used as input.

Returns

int3

Componentwise ceiling of the base-2 logarithm of x.

Remarks

Components of x must be greater than 0, otherwise the result for that component is undefined.

ceillog2(int4)

Computes the componentwise ceiling of the base-2 logarithm of x.

public static int4 ceillog2(int4 x)

Parameters

x int4

int4 to be used as input.

Returns

int4

Componentwise ceiling of the base-2 logarithm of x.

Remarks

Components of x must be greater than 0, otherwise the result for that component is undefined.

ceillog2(uint2)

Computes the componentwise ceiling of the base-2 logarithm of x.

public static int2 ceillog2(uint2 x)

Parameters

x uint2

uint2 to be used as input.

Returns

int2

Componentwise ceiling of the base-2 logarithm of x.

Remarks

Components of x must be greater than 0, otherwise the result for that component is undefined.

ceillog2(uint3)

Computes the componentwise ceiling of the base-2 logarithm of x.

public static int3 ceillog2(uint3 x)

Parameters

x uint3

uint3 to be used as input.

Returns

int3

Componentwise ceiling of the base-2 logarithm of x.

Remarks

Components of x must be greater than 0, otherwise the result for that component is undefined.

ceillog2(uint4)

Computes the componentwise ceiling of the base-2 logarithm of x.

public static int4 ceillog2(uint4 x)

Parameters

x uint4

uint4 to be used as input.

Returns

int4

Componentwise ceiling of the base-2 logarithm of x.

Remarks

Components of x must be greater than 0, otherwise the result for that component is undefined.

ceillog2(int)

Computes the ceiling of the base-2 logarithm of x.

public static int ceillog2(int x)

Parameters

x int

Integer to be used as input.

Returns

int

Ceiling of the base-2 logarithm of x, as an integer.

Remarks

x must be greater than 0, otherwise the result is undefined.

ceillog2(uint)

Computes the ceiling of the base-2 logarithm of x.

public static int ceillog2(uint x)

Parameters

x uint

Unsigned integer to be used as input.

Returns

int

Ceiling of the base-2 logarithm of x, as an integer.

Remarks

x must be greater than 0, otherwise the result is undefined.

ceilpow2(int2)

Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.

public static int2 ceilpow2(int2 x)

Parameters

x int2

Input value.

Returns

int2

The componentwise smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(int3)

Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.

public static int3 ceilpow2(int3 x)

Parameters

x int3

Input value.

Returns

int3

The componentwise smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(int4)

Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.

public static int4 ceilpow2(int4 x)

Parameters

x int4

Input value.

Returns

int4

The componentwise smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(uint2)

Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.

public static uint2 ceilpow2(uint2 x)

Parameters

x uint2

Input value.

Returns

uint2

The componentwise smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(uint3)

Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.

public static uint3 ceilpow2(uint3 x)

Parameters

x uint3

Input value.

Returns

uint3

The componentwise smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(uint4)

Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.

public static uint4 ceilpow2(uint4 x)

Parameters

x uint4

Input value.

Returns

uint4

The componentwise smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(int)

Returns the smallest power of two greater than or equal to the input.

public static int ceilpow2(int x)

Parameters

x int

Input value.

Returns

int

The smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(long)

Returns the smallest power of two greater than or equal to the input.

public static long ceilpow2(long x)

Parameters

x long

Input value.

Returns

long

The smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(uint)

Returns the smallest power of two greater than or equal to the input.

public static uint ceilpow2(uint x)

Parameters

x uint

Input value.

Returns

uint

The smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

ceilpow2(ulong)

Returns the smallest power of two greater than or equal to the input.

public static ulong ceilpow2(ulong x)

Parameters

x ulong

Input value.

Returns

ulong

The smallest power of two greater than or equal to the input.

Remarks

Also known as nextpow2.

chgsign(float2, float2)

Change the sign of components of x based on the most significant bit of components of y [msb(y) ? -x : x].

public static float2 chgsign(float2 x, float2 y)

Parameters

x float2

The single precision float vector to change the sign.

y float2

The single precision float vector used to test the most significant bit.

Returns

float2

Returns vector x with changed sign based on vector y.

chgsign(float3, float3)

Change the sign of components of x based on the most significant bit of components of y [msb(y) ? -x : x].

public static float3 chgsign(float3 x, float3 y)

Parameters

x float3

The single precision float vector to change the sign.

y float3

The single precision float vector used to test the most significant bit.

Returns

float3

Returns vector x with changed sign based on vector y.

chgsign(float4, float4)

Change the sign of components of x based on the most significant bit of components of y [msb(y) ? -x : x].

public static float4 chgsign(float4 x, float4 y)

Parameters

x float4

The single precision float vector to change the sign.

y float4

The single precision float vector used to test the most significant bit.

Returns

float4

Returns vector x with changed sign based on vector y.

chgsign(float, float)

Change the sign of x based on the most significant bit of y [msb(y) ? -x : x].

public static float chgsign(float x, float y)

Parameters

x float

The single precision float to change the sign.

y float

The single precision float used to test the most significant bit.

Returns

float

Returns x with changed sign based on y.

clamp(double2, double2, double2)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are double2 vectors.

public static double2 clamp(double2 valueToClamp, double2 lowerBound, double2 upperBound)

Parameters

valueToClamp double2

Input value to be clamped.

lowerBound double2

Lower bound of the interval.

upperBound double2

Upper bound of the interval.

Returns

double2

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(double3, double3, double3)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are double3 vectors.

public static double3 clamp(double3 valueToClamp, double3 lowerBound, double3 upperBound)

Parameters

valueToClamp double3

Input value to be clamped.

lowerBound double3

Lower bound of the interval.

upperBound double3

Upper bound of the interval.

Returns

double3

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(double4, double4, double4)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are double4 vectors.

public static double4 clamp(double4 valueToClamp, double4 lowerBound, double4 upperBound)

Parameters

valueToClamp double4

Input value to be clamped.

lowerBound double4

Lower bound of the interval.

upperBound double4

Upper bound of the interval.

Returns

double4

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(float2, float2, float2)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are float2 vectors.

public static float2 clamp(float2 valueToClamp, float2 lowerBound, float2 upperBound)

Parameters

valueToClamp float2

Input value to be clamped.

lowerBound float2

Lower bound of the interval.

upperBound float2

Upper bound of the interval.

Returns

float2

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(float3, float3, float3)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are float3 vectors.

public static float3 clamp(float3 valueToClamp, float3 lowerBound, float3 upperBound)

Parameters

valueToClamp float3

Input value to be clamped.

lowerBound float3

Lower bound of the interval.

upperBound float3

Upper bound of the interval.

Returns

float3

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(float4, float4, float4)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are float4 vectors.

public static float4 clamp(float4 valueToClamp, float4 lowerBound, float4 upperBound)

Parameters

valueToClamp float4

Input value to be clamped.

lowerBound float4

Lower bound of the interval.

upperBound float4

Upper bound of the interval.

Returns

float4

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(int2, int2, int2)

Returns the result of a componentwise clamping of the int2 x into the interval [a, b], where a and b are int2 vectors.

public static int2 clamp(int2 valueToClamp, int2 lowerBound, int2 upperBound)

Parameters

valueToClamp int2

Input value to be clamped.

lowerBound int2

Lower bound of the interval.

upperBound int2

Upper bound of the interval.

Returns

int2

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(int3, int3, int3)

Returns the result of a componentwise clamping of the int3 x into the interval [a, b], where x, a and b are int3 vectors.

public static int3 clamp(int3 valueToClamp, int3 lowerBound, int3 upperBound)

Parameters

valueToClamp int3

Input value to be clamped.

lowerBound int3

Lower bound of the interval.

upperBound int3

Upper bound of the interval.

Returns

int3

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(int4, int4, int4)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are int4 vectors.

public static int4 clamp(int4 valueToClamp, int4 lowerBound, int4 upperBound)

Parameters

valueToClamp int4

Input value to be clamped.

lowerBound int4

Lower bound of the interval.

upperBound int4

Upper bound of the interval.

Returns

int4

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(uint2, uint2, uint2)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are uint2 vectors.

public static uint2 clamp(uint2 valueToClamp, uint2 lowerBound, uint2 upperBound)

Parameters

valueToClamp uint2

Input value to be clamped.

lowerBound uint2

Lower bound of the interval.

upperBound uint2

Upper bound of the interval.

Returns

uint2

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(uint3, uint3, uint3)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are uint3 vectors.

public static uint3 clamp(uint3 valueToClamp, uint3 lowerBound, uint3 upperBound)

Parameters

valueToClamp uint3

Input value to be clamped.

lowerBound uint3

Lower bound of the interval.

upperBound uint3

Upper bound of the interval.

Returns

uint3

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(uint4, uint4, uint4)

Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are uint4 vectors.

public static uint4 clamp(uint4 valueToClamp, uint4 lowerBound, uint4 upperBound)

Parameters

valueToClamp uint4

Input value to be clamped.

lowerBound uint4

Lower bound of the interval.

upperBound uint4

Upper bound of the interval.

Returns

uint4

The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(double, double, double)

Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are double values.

public static double clamp(double valueToClamp, double lowerBound, double upperBound)

Parameters

valueToClamp double

Input value to be clamped.

lowerBound double

Lower bound of the interval.

upperBound double

Upper bound of the interval.

Returns

double

The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(int, int, int)

Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are int values.

public static int clamp(int valueToClamp, int lowerBound, int upperBound)

Parameters

valueToClamp int

Input value to be clamped.

lowerBound int

Lower bound of the interval.

upperBound int

Upper bound of the interval.

Returns

int

The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(long, long, long)

Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are long values.

public static long clamp(long valueToClamp, long lowerBound, long upperBound)

Parameters

valueToClamp long

Input value to be clamped.

lowerBound long

Lower bound of the interval.

upperBound long

Upper bound of the interval.

Returns

long

The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(float, float, float)

Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are float values.

public static float clamp(float valueToClamp, float lowerBound, float upperBound)

Parameters

valueToClamp float

Input value to be clamped.

lowerBound float

Lower bound of the interval.

upperBound float

Upper bound of the interval.

Returns

float

The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(uint, uint, uint)

Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are uint values.

public static uint clamp(uint valueToClamp, uint lowerBound, uint upperBound)

Parameters

valueToClamp uint

Input value to be clamped.

lowerBound uint

Lower bound of the interval.

upperBound uint

Upper bound of the interval.

Returns

uint

The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

clamp(ulong, ulong, ulong)

Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are ulong values.

public static ulong clamp(ulong valueToClamp, ulong lowerBound, ulong upperBound)

Parameters

valueToClamp ulong

Input value to be clamped.

lowerBound ulong

Lower bound of the interval.

upperBound ulong

Upper bound of the interval.

Returns

ulong

The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound].

cmax(double2)

Returns the maximum component of a double2 vector.

public static double cmax(double2 x)

Parameters

x double2

The vector to use when computing the maximum component.

Returns

double

The value of the maximum component of the vector.

cmax(double3)

Returns the maximum component of a double3 vector.

public static double cmax(double3 x)

Parameters

x double3

The vector to use when computing the maximum component.

Returns

double

The value of the maximum component of the vector.

cmax(double4)

Returns the maximum component of a double4 vector.

public static double cmax(double4 x)

Parameters

x double4

The vector to use when computing the maximum component.

Returns

double

The value of the maximum component of the vector.

cmax(float2)

Returns the maximum component of a float2 vector.

public static float cmax(float2 x)

Parameters

x float2

The vector to use when computing the maximum component.

Returns

float

The value of the maximum component of the vector.

cmax(float3)

Returns the maximum component of a float3 vector.

public static float cmax(float3 x)

Parameters

x float3

The vector to use when computing the maximum component.

Returns

float

The value of the maximum component of the vector.

cmax(float4)

Returns the maximum component of a float4 vector.

public static float cmax(float4 x)

Parameters

x float4

The vector to use when computing the maximum component.

Returns

float

The value of the maximum component of the vector.

cmax(int2)

Returns the maximum component of an int2 vector.

public static int cmax(int2 x)

Parameters

x int2

The vector to use when computing the maximum component.

Returns

int

The value of the maximum component of the vector.

cmax(int3)

Returns the maximum component of an int3 vector.

public static int cmax(int3 x)

Parameters

x int3

The vector to use when computing the maximum component.

Returns

int

The value of the maximum component of the vector.

cmax(int4)

Returns the maximum component of an int4 vector.

public static int cmax(int4 x)

Parameters

x int4

The vector to use when computing the maximum component.

Returns

int

The value of the maximum component of the vector.

cmax(uint2)

Returns the maximum component of a uint2 vector.

public static uint cmax(uint2 x)

Parameters

x uint2

The vector to use when computing the maximum component.

Returns

uint

The value of the maximum component of the vector.

cmax(uint3)

Returns the maximum component of a uint3 vector.

public static uint cmax(uint3 x)

Parameters

x uint3

The vector to use when computing the maximum component.

Returns

uint

The value of the maximum component of the vector.

cmax(uint4)

Returns the maximum component of a uint4 vector.

public static uint cmax(uint4 x)

Parameters

x uint4

The vector to use when computing the maximum component.

Returns

uint

The value of the maximum component of the vector.

cmin(double2)

Returns the minimum component of a double2 vector.

public static double cmin(double2 x)

Parameters

x double2

The vector to use when computing the minimum component.

Returns

double

The value of the minimum component of the vector.

cmin(double3)

Returns the minimum component of a double3 vector.

public static double cmin(double3 x)

Parameters

x double3

The vector to use when computing the minimum component.

Returns

double

The value of the minimum component of the vector.

cmin(double4)

Returns the minimum component of a double4 vector.

public static double cmin(double4 x)

Parameters

x double4

The vector to use when computing the minimum component.

Returns

double

The value of the minimum component of the vector.

cmin(float2)

Returns the minimum component of a float2 vector.

public static float cmin(float2 x)

Parameters

x float2

The vector to use when computing the minimum component.

Returns

float

The value of the minimum component of the vector.

cmin(float3)

Returns the minimum component of a float3 vector.

public static float cmin(float3 x)

Parameters

x float3

The vector to use when computing the minimum component.

Returns

float

The value of the minimum component of the vector.

cmin(float4)

Returns the minimum component of a float4 vector.

public static float cmin(float4 x)

Parameters

x float4

The vector to use when computing the minimum component.

Returns

float

The value of the minimum component of the vector.

cmin(int2)

Returns the minimum component of an int2 vector.

public static int cmin(int2 x)

Parameters

x int2

The vector to use when computing the minimum component.

Returns

int

The value of the minimum component of the vector.

cmin(int3)

Returns the minimum component of an int3 vector.

public static int cmin(int3 x)

Parameters

x int3

The vector to use when computing the minimum component.

Returns

int

The value of the minimum component of the vector.

cmin(int4)

Returns the minimum component of an int4 vector.

public static int cmin(int4 x)

Parameters

x int4

The vector to use when computing the minimum component.

Returns

int

The value of the minimum component of the vector.

cmin(uint2)

Returns the minimum component of a uint2 vector.

public static uint cmin(uint2 x)

Parameters

x uint2

The vector to use when computing the minimum component.

Returns

uint

The value of the minimum component of the vector.

cmin(uint3)

Returns the minimum component of a uint3 vector.

public static uint cmin(uint3 x)

Parameters

x uint3

The vector to use when computing the minimum component.

Returns

uint

The value of the minimum component of the vector.

cmin(uint4)

Returns the minimum component of a uint4 vector.

public static uint cmin(uint4 x)

Parameters

x uint4

The vector to use when computing the minimum component.

Returns

uint

The value of the minimum component of the vector.

compress(int*, int, int4, bool4)

Packs components with an enabled mask to the left.

public static int compress(int* output, int index, int4 val, bool4 mask)

Parameters

output int*

Pointer to packed output array where enabled components should be stored to.

index int

Index into output array where first enabled component should be stored to.

val int4

The value to to compress.

mask bool4

Mask indicating which components are enabled.

Returns

int

Index to element after the last one stored.

Remarks

This function is also known as left packing. The effect of this function is to filter out components that are not enabled and leave an output buffer tightly packed with only the enabled components. A common use case is if you perform intersection tests on arrays of data in structure of arrays (SoA) form and need to produce an output array of the things that intersected.

compress(float*, int, float4, bool4)

Packs components with an enabled mask to the left.

public static int compress(float* output, int index, float4 val, bool4 mask)

Parameters

output float*

Pointer to packed output array where enabled components should be stored to.

index int

Index into output array where first enabled component should be stored to.

val float4

The value to to compress.

mask bool4

Mask indicating which components are enabled.

Returns

int

Index to element after the last one stored.

Remarks

This function is also known as left packing. The effect of this function is to filter out components that are not enabled and leave an output buffer tightly packed with only the enabled components. A common use case is if you perform intersection tests on arrays of data in structure of arrays (SoA) form and need to produce an output array of the things that intersected.

compress(uint*, int, uint4, bool4)

Packs components with an enabled mask to the left.

public static int compress(uint* output, int index, uint4 val, bool4 mask)

Parameters

output uint*

Pointer to packed output array where enabled components should be stored to.

index int

Index into output array where first enabled component should be stored to.

val uint4

The value to to compress.

mask bool4

Mask indicating which components are enabled.

Returns

int

Index to element after the last one stored.

Remarks

This function is also known as left packing. The effect of this function is to filter out components that are not enabled and leave an output buffer tightly packed with only the enabled components. A common use case is if you perform intersection tests on arrays of data in structure of arrays (SoA) form and need to produce an output array of the things that intersected.

conjugate(quaternion)

Returns the conjugate of a quaternion value.

public static quaternion conjugate(quaternion q)

Parameters

q quaternion

The quaternion to conjugate.

Returns

quaternion

The conjugate of the input quaternion.

cos(double2)

Returns the componentwise cosine of a double2 vector.

public static double2 cos(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise cosine cosine of the input.

cos(double3)

Returns the componentwise cosine of a double3 vector.

public static double3 cos(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise cosine cosine of the input.

cos(double4)

Returns the componentwise cosine of a double4 vector.

public static double4 cos(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise cosine cosine of the input.

cos(float2)

Returns the componentwise cosine of a float2 vector.

public static float2 cos(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise cosine cosine of the input.

cos(float3)

Returns the componentwise cosine of a float3 vector.

public static float3 cos(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise cosine cosine of the input.

cos(float4)

Returns the componentwise cosine of a float4 vector.

public static float4 cos(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise cosine cosine of the input.

cos(double)

Returns the cosine of a double value.

public static double cos(double x)

Parameters

x double

Input value.

Returns

double

The cosine cosine of the input.

cos(float)

Returns the cosine of a float value.

public static float cos(float x)

Parameters

x float

Input value.

Returns

float

The cosine cosine of the input.

cosh(double2)

Returns the componentwise hyperbolic cosine of a double2 vector.

public static double2 cosh(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise hyperbolic cosine of the input.

cosh(double3)

Returns the componentwise hyperbolic cosine of a double3 vector.

public static double3 cosh(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise hyperbolic cosine of the input.

cosh(double4)

Returns the componentwise hyperbolic cosine of a double4 vector.

public static double4 cosh(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise hyperbolic cosine of the input.

cosh(float2)

Returns the componentwise hyperbolic cosine of a float2 vector.

public static float2 cosh(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise hyperbolic cosine of the input.

cosh(float3)

Returns the componentwise hyperbolic cosine of a float3 vector.

public static float3 cosh(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise hyperbolic cosine of the input.

cosh(float4)

Returns the componentwise hyperbolic cosine of a float4 vector.

public static float4 cosh(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise hyperbolic cosine of the input.

cosh(double)

Returns the hyperbolic cosine of a double value.

public static double cosh(double x)

Parameters

x double

Input value.

Returns

double

The hyperbolic cosine of the input.

cosh(float)

Returns the hyperbolic cosine of a float value.

public static float cosh(float x)

Parameters

x float

Input value.

Returns

float

The hyperbolic cosine of the input.

countbits(int2)

Returns component-wise number of 1-bits in the binary representation of an int2 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int2 countbits(int2 x)

Parameters

x int2

int2 value in which to count bits for each component.

Returns

int2

int2 containing number of bits set to 1 within each component of x.

countbits(int3)

Returns component-wise number of 1-bits in the binary representation of an int3 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int3 countbits(int3 x)

Parameters

x int3

Number in which to count bits.

Returns

int3

int3 containing number of bits set to 1 within each component of x.

countbits(int4)

Returns component-wise number of 1-bits in the binary representation of an int4 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int4 countbits(int4 x)

Parameters

x int4

Number in which to count bits.

Returns

int4

int4 containing number of bits set to 1 within each component of x.

countbits(uint2)

Returns component-wise number of 1-bits in the binary representation of a uint2 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int2 countbits(uint2 x)

Parameters

x uint2

Number in which to count bits.

Returns

int2

int2 containing number of bits set to 1 within each component of x.

countbits(uint3)

Returns component-wise number of 1-bits in the binary representation of a uint3 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int3 countbits(uint3 x)

Parameters

x uint3

Number in which to count bits.

Returns

int3

int3 containing number of bits set to 1 within each component of x.

countbits(uint4)

Returns component-wise number of 1-bits in the binary representation of a uint4 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int4 countbits(uint4 x)

Parameters

x uint4

Number in which to count bits.

Returns

int4

int4 containing number of bits set to 1 within each component of x.

countbits(int)

Returns number of 1-bits in the binary representation of an int value. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int countbits(int x)

Parameters

x int

int value in which to count bits set to 1.

Returns

int

Number of bits set to 1 within x.

countbits(long)

Returns number of 1-bits in the binary representation of a long value. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int countbits(long x)

Parameters

x long

Number in which to count bits.

Returns

int

Number of bits set to 1 within x.

countbits(uint)

Returns number of 1-bits in the binary representation of a uint value. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int countbits(uint x)

Parameters

x uint

Number in which to count bits.

Returns

int

Number of bits set to 1 within x.

countbits(ulong)

Returns number of 1-bits in the binary representation of a ulong value. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM.

public static int countbits(ulong x)

Parameters

x ulong

Number in which to count bits.

Returns

int

Number of bits set to 1 within x.

cross(double3, double3)

Returns the cross product of two double3 vectors.

public static double3 cross(double3 x, double3 y)

Parameters

x double3

First vector to use in cross product.

y double3

Second vector to use in cross product.

Returns

double3

The cross product of x and y.

cross(float3, float3)

Returns the cross product of two float3 vectors.

public static float3 cross(float3 x, float3 y)

Parameters

x float3

First vector to use in cross product.

y float3

Second vector to use in cross product.

Returns

float3

The cross product of x and y.

csum(double2)

Returns the horizontal sum of components of a double2 vector.

public static double csum(double2 x)

Parameters

x double2

The vector to use when computing the horizontal sum.

Returns

double

The horizontal sum of of components of the vector.

csum(double3)

Returns the horizontal sum of components of a double3 vector.

public static double csum(double3 x)

Parameters

x double3

The vector to use when computing the horizontal sum.

Returns

double

The horizontal sum of of components of the vector.

csum(double4)

Returns the horizontal sum of components of a double4 vector.

public static double csum(double4 x)

Parameters

x double4

The vector to use when computing the horizontal sum.

Returns

double

The horizontal sum of of components of the vector.

csum(float2)

Returns the horizontal sum of components of a float2 vector.

public static float csum(float2 x)

Parameters

x float2

The vector to use when computing the horizontal sum.

Returns

float

The horizontal sum of of components of the vector.

csum(float3)

Returns the horizontal sum of components of a float3 vector.

public static float csum(float3 x)

Parameters

x float3

The vector to use when computing the horizontal sum.

Returns

float

The horizontal sum of of components of the vector.

csum(float4)

Returns the horizontal sum of components of a float4 vector.

public static float csum(float4 x)

Parameters

x float4

The vector to use when computing the horizontal sum.

Returns

float

The horizontal sum of of components of the vector.

csum(int2)

Returns the horizontal sum of components of an int2 vector.

public static int csum(int2 x)

Parameters

x int2

The vector to use when computing the horizontal sum.

Returns

int

The horizontal sum of of components of the vector.

csum(int3)

Returns the horizontal sum of components of an int3 vector.

public static int csum(int3 x)

Parameters

x int3

The vector to use when computing the horizontal sum.

Returns

int

The horizontal sum of of components of the vector.

csum(int4)

Returns the horizontal sum of components of an int4 vector.

public static int csum(int4 x)

Parameters

x int4

The vector to use when computing the horizontal sum.

Returns

int

The horizontal sum of of components of the vector.

csum(uint2)

Returns the horizontal sum of components of a uint2 vector.

public static uint csum(uint2 x)

Parameters

x uint2

The vector to use when computing the horizontal sum.

Returns

uint

The horizontal sum of of components of the vector.

csum(uint3)

Returns the horizontal sum of components of a uint3 vector.

public static uint csum(uint3 x)

Parameters

x uint3

The vector to use when computing the horizontal sum.

Returns

uint

The horizontal sum of of components of the vector.

csum(uint4)

Returns the horizontal sum of components of a uint4 vector.

public static uint csum(uint4 x)

Parameters

x uint4

The vector to use when computing the horizontal sum.

Returns

uint

The horizontal sum of of components of the vector.

degrees(double2)

Returns the result of a componentwise conversion of a double2 vector from radians to degrees.

public static double2 degrees(double2 x)

Parameters

x double2

Vector containing angles in radians.

Returns

double2

Vector containing angles converted to degrees.

degrees(double3)

Returns the result of a componentwise conversion of a double3 vector from radians to degrees.

public static double3 degrees(double3 x)

Parameters

x double3

Vector containing angles in radians.

Returns

double3

Vector containing values converted to degrees.

degrees(double4)

Returns the result of a componentwise conversion of a double4 vector from radians to degrees.

public static double4 degrees(double4 x)

Parameters

x double4

Vector containing angles in radians.

Returns

double4

Vector containing angles converted to degrees.

degrees(float2)

Returns the result of a componentwise conversion of a double2 vector from radians to degrees.

public static float2 degrees(float2 x)

Parameters

x float2

Vector containing angles in radians.

Returns

float2

Vector containing angles converted to degrees.

degrees(float3)

Returns the result of a componentwise conversion of a double3 vector from radians to degrees.

public static float3 degrees(float3 x)

Parameters

x float3

Vector containing angles in radians.

Returns

float3

Vector containing angles converted to degrees.

degrees(float4)

Returns the result of a componentwise conversion of a double4 vector from radians to degrees.

public static float4 degrees(float4 x)

Parameters

x float4

Vector containing angles in radians.

Returns

float4

Vector containing angles converted to degrees.

degrees(double)

Returns the result of converting a double value from radians to degrees.

public static double degrees(double x)

Parameters

x double

Angle in radians.

Returns

double

Angle converted to degrees.

degrees(float)

Returns the result of converting a double value from radians to degrees.

public static float degrees(float x)

Parameters

x float

Angle in radians.

Returns

float

Angle converted to degrees.

determinant(double2x2)

public static double determinant(double2x2 value)

Parameters

value double2x2

Returns

double

determinant(double3x3)

public static double determinant(double3x3 value)

Parameters

value double3x3

Returns

double

determinant(double4x4)

public static double determinant(double4x4 value)

Parameters

value double4x4

Returns

double

determinant(float2x2)

public static float determinant(float2x2 value)

Parameters

value float2x2

Returns

float

determinant(float3x3)

public static float determinant(float3x3 value)

Parameters

value float3x3

Returns

float

determinant(float4x4)

public static float determinant(float4x4 value)

Parameters

value float4x4

Returns

float

determinant(int2x2)

public static int determinant(int2x2 value)

Parameters

value int2x2

Returns

int

determinant(int3x3)

public static int determinant(int3x3 value)

Parameters

value int3x3

Returns

int

determinant(int4x4)

public static int determinant(int4x4 value)

Parameters

value int4x4

Returns

int

determinant(uint2x2)

public static uint determinant(uint2x2 value)

Parameters

value uint2x2

Returns

uint

determinant(uint3x3)

public static uint determinant(uint3x3 value)

Parameters

value uint3x3

Returns

uint

determinant(uint4x4)

public static uint determinant(uint4x4 value)

Parameters

value uint4x4

Returns

uint

distance(double2, double2)

Returns the distance between two double2 vectors.

public static double distance(double2 x, double2 y)

Parameters

x double2

First vector to use in distance computation.

y double2

Second vector to use in distance computation.

Returns

double

The distance between x and y.

distance(double3, double3)

Returns the distance between two double3 vectors.

public static double distance(double3 x, double3 y)

Parameters

x double3

First vector to use in distance computation.

y double3

Second vector to use in distance computation.

Returns

double

The distance between x and y.

distance(double4, double4)

Returns the distance between two double4 vectors.

public static double distance(double4 x, double4 y)

Parameters

x double4

First vector to use in distance computation.

y double4

Second vector to use in distance computation.

Returns

double

The distance between x and y.

distance(float2, float2)

Returns the distance between two float2 vectors.

public static float distance(float2 x, float2 y)

Parameters

x float2

First vector to use in distance computation.

y float2

Second vector to use in distance computation.

Returns

float

The distance between x and y.

distance(float3, float3)

Returns the distance between two float3 vectors.

public static float distance(float3 x, float3 y)

Parameters

x float3

First vector to use in distance computation.

y float3

Second vector to use in distance computation.

Returns

float

The distance between x and y.

distance(float4, float4)

Returns the distance between two float4 vectors.

public static float distance(float4 x, float4 y)

Parameters

x float4

First vector to use in distance computation.

y float4

Second vector to use in distance computation.

Returns

float

The distance between x and y.

distance(double, double)

Returns the distance between two double values.

public static double distance(double x, double y)

Parameters

x double

First value to use in distance computation.

y double

Second value to use in distance computation.

Returns

double

The distance between x and y.

distance(float, float)

Returns the distance between two float values.

public static float distance(float x, float y)

Parameters

x float

First value to use in distance computation.

y float

Second value to use in distance computation.

Returns

float

The distance between x and y.

distancesq(double2, double2)

Returns the squared distance between two double2 vectors.

public static double distancesq(double2 x, double2 y)

Parameters

x double2

First vector to use in distance computation.

y double2

Second vector to use in distance computation.

Returns

double

The squared distance between x and y.

distancesq(double3, double3)

Returns the squared distance between two double3 vectors.

public static double distancesq(double3 x, double3 y)

Parameters

x double3

First vector to use in distance computation.

y double3

Second vector to use in distance computation.

Returns

double

The squared distance between x and y.

distancesq(double4, double4)

Returns the squared distance between two double4 vectors.

public static double distancesq(double4 x, double4 y)

Parameters

x double4

First vector to use in distance computation.

y double4

Second vector to use in distance computation.

Returns

double

The squared distance between x and y.

distancesq(float2, float2)

Returns the squared distance between two float2 vectors.

public static float distancesq(float2 x, float2 y)

Parameters

x float2

First vector to use in distance computation.

y float2

Second vector to use in distance computation.

Returns

float

The squared distance between x and y.

distancesq(float3, float3)

Returns the squared distance between two float3 vectors.

public static float distancesq(float3 x, float3 y)

Parameters

x float3

First vector to use in distance computation.

y float3

Second vector to use in distance computation.

Returns

float

The squared distance between x and y.

distancesq(float4, float4)

Returns the squared distance between two float4 vectors.

public static float distancesq(float4 x, float4 y)

Parameters

x float4

First vector to use in distance computation.

y float4

Second vector to use in distance computation.

Returns

float

The squared distance between x and y.

distancesq(double, double)

Returns the squared distance between two double values.

public static double distancesq(double x, double y)

Parameters

x double

First value to use in distance computation.

y double

Second value to use in distance computation.

Returns

double

The squared distance between x and y.

distancesq(float, float)

Returns the squared distance between two float values.

public static float distancesq(float x, float y)

Parameters

x float

First value to use in distance computation.

y float

Second value to use in distance computation.

Returns

float

The squared distance between x and y.

dot(double2, double2)

Returns the dot product of two double2 vectors.

public static double dot(double2 x, double2 y)

Parameters

x double2

The first vector.

y double2

The second vector.

Returns

double

The dot product of two vectors.

dot(double3, double3)

Returns the dot product of two double3 vectors.

public static double dot(double3 x, double3 y)

Parameters

x double3

The first vector.

y double3

The second vector.

Returns

double

The dot product of two vectors.

dot(double4, double4)

Returns the dot product of two double4 vectors.

public static double dot(double4 x, double4 y)

Parameters

x double4

The first vector.

y double4

The second vector.

Returns

double

The dot product of two vectors.

dot(float2, float2)

Returns the dot product of two float2 vectors.

public static float dot(float2 x, float2 y)

Parameters

x float2

The first vector.

y float2

The second vector.

Returns

float

The dot product of two vectors.

dot(float3, float3)

Returns the dot product of two float3 vectors.

public static float dot(float3 x, float3 y)

Parameters

x float3

The first vector.

y float3

The second vector.

Returns

float

The dot product of two vectors.

dot(float4, float4)

Returns the dot product of two float4 vectors.

public static float dot(float4 x, float4 y)

Parameters

x float4

The first vector.

y float4

The second vector.

Returns

float

The dot product of two vectors.

dot(int2, int2)

Returns the dot product of two int2 vectors.

public static int dot(int2 x, int2 y)

Parameters

x int2

The first vector.

y int2

The second vector.

Returns

int

The dot product of two vectors.

dot(int3, int3)

Returns the dot product of two int3 vectors.

public static int dot(int3 x, int3 y)

Parameters

x int3

The first vector.

y int3

The second vector.

Returns

int

The dot product of two vectors.

dot(int4, int4)

Returns the dot product of two int4 vectors.

public static int dot(int4 x, int4 y)

Parameters

x int4

The first vector.

y int4

The second vector.

Returns

int

The dot product of two vectors.

dot(quaternion, quaternion)

Returns the dot product of two quaternions.

public static float dot(quaternion a, quaternion b)

Parameters

a quaternion

The first quaternion.

b quaternion

The second quaternion.

Returns

float

The dot product of two quaternions.

dot(uint2, uint2)

Returns the dot product of two uint2 vectors.

public static uint dot(uint2 x, uint2 y)

Parameters

x uint2

The first vector.

y uint2

The second vector.

Returns

uint

The dot product of two vectors.

dot(uint3, uint3)

Returns the dot product of two uint3 vectors.

public static uint dot(uint3 x, uint3 y)

Parameters

x uint3

The first vector.

y uint3

The second vector.

Returns

uint

The dot product of two vectors.

dot(uint4, uint4)

Returns the dot product of two uint4 vectors.

public static uint dot(uint4 x, uint4 y)

Parameters

x uint4

The first vector.

y uint4

The second vector.

Returns

uint

The dot product of two vectors.

dot(double, double)

Returns the dot product of two double values. Equivalent to multiplication.

public static double dot(double x, double y)

Parameters

x double

The first value.

y double

The second value.

Returns

double

The dot product of two values.

dot(int, int)

Returns the dot product of two int values. Equivalent to multiplication.

public static int dot(int x, int y)

Parameters

x int

The first value.

y int

The second value.

Returns

int

The dot product of two values.

dot(float, float)

Returns the dot product of two float values. Equivalent to multiplication.

public static float dot(float x, float y)

Parameters

x float

The first value.

y float

The second value.

Returns

float

The dot product of two values.

dot(uint, uint)

Returns the dot product of two uint values. Equivalent to multiplication.

public static uint dot(uint x, uint y)

Parameters

x uint

The first value.

y uint

The second value.

Returns

uint

The dot product of two values.

double2(bool2)

public static double2 double2(bool2 v)

Parameters

v bool2

Returns

double2

double2(double2)

public static double2 double2(double2 xy)

Parameters

xy double2

Returns

double2

double2(float2)

public static double2 double2(float2 v)

Parameters

v float2

Returns

double2

double2(int2)

public static double2 double2(int2 v)

Parameters

v int2

Returns

double2

double2(uint2)

public static double2 double2(uint2 v)

Parameters

v uint2

Returns

double2

double2(double)

public static double2 double2(double value)

Parameters

value double

Returns

double2

double2(double, double)

public static double2 double2(double x, double y)

Parameters

x double
y double

Returns

double2

double2(int)

public static double2 double2(int v)

Parameters

v int

Returns

double2

double2(float)

public static double2 double2(float v)

Parameters

v float

Returns

double2

double2(uint)

public static double2 double2(uint v)

Parameters

v uint

Returns

double2

double2x2(double2)

public static double2x2 double2x2(double2 value)

Parameters

value double2

Returns

double2x2

double2x2(double2, double2)

public static double2x2 double2x2(double2 c0, double2 c1)

Parameters

c0 double2
c1 double2

Returns

double2x2

double2x2(double)

public static double2x2 double2x2(double value)

Parameters

value double

Returns

double2x2

double2x2(double, double, double, double)

public static double2x2 double2x2(double m00, double m01, double m10, double m11)

Parameters

m00 double
m01 double
m10 double
m11 double

Returns

double2x2

double2x3(double2)

public static double2x3 double2x3(double2 value)

Parameters

value double2

Returns

double2x3

double2x3(double2, double2, double2)

public static double2x3 double2x3(double2 c0, double2 c1, double2 c2)

Parameters

c0 double2
c1 double2
c2 double2

Returns

double2x3

double2x3(double)

public static double2x3 double2x3(double value)

Parameters

value double

Returns

double2x3

double2x3(double, double, double, double, double, double)

public static double2x3 double2x3(double m00, double m01, double m02, double m10, double m11, double m12)

Parameters

m00 double
m01 double
m02 double
m10 double
m11 double
m12 double

Returns

double2x3

double2x4(double2)

public static double2x4 double2x4(double2 value)

Parameters

value double2

Returns

double2x4

double2x4(double2, double2, double2, double2)

public static double2x4 double2x4(double2 c0, double2 c1, double2 c2, double2 c3)

Parameters

c0 double2
c1 double2
c2 double2
c3 double2

Returns

double2x4

double2x4(double)

public static double2x4 double2x4(double value)

Parameters

value double

Returns

double2x4

double2x4(double, double, double, double, double, double, double, double)

public static double2x4 double2x4(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13)

Parameters

m00 double
m01 double
m02 double
m03 double
m10 double
m11 double
m12 double
m13 double

Returns

double2x4

double3(bool3)

public static double3 double3(bool3 v)

Parameters

v bool3

Returns

double3

double3(double2, double)

public static double3 double3(double2 xy, double z)

Parameters

xy double2
z double

Returns

double3

double3(double3)

public static double3 double3(double3 xyz)

Parameters

xyz double3

Returns

double3

double3(float3)

public static double3 double3(float3 v)

Parameters

v float3

Returns

double3

double3(int3)

public static double3 double3(int3 v)

Parameters

v int3

Returns

double3

double3(uint3)

public static double3 double3(uint3 v)

Parameters

v uint3

Returns

double3

double3(double)

public static double3 double3(double value)

Parameters

value double

Returns

double3

double3(double, double2)

public static double3 double3(double x, double2 yz)

Parameters

x double
yz double2

Returns

double3

double3(double, double, double)

public static double3 double3(double x, double y, double z)

Parameters

x double
y double
z double

Returns

double3

double3(int)

public static double3 double3(int v)

Parameters

v int

Returns

double3

double3(float)

public static double3 double3(float v)

Parameters

v float

Returns

double3

double3(uint)

public static double3 double3(uint v)

Parameters

v uint

Returns

double3

double3x2(double3)

public static double3x2 double3x2(double3 value)

Parameters

value double3

Returns

double3x2

double3x2(double3, double3)

public static double3x2 double3x2(double3 c0, double3 c1)

Parameters

c0 double3
c1 double3

Returns

double3x2

double3x2(double)

public static double3x2 double3x2(double value)

Parameters

value double

Returns

double3x2

double3x2(double, double, double, double, double, double)

public static double3x2 double3x2(double m00, double m01, double m10, double m11, double m20, double m21)

Parameters

m00 double
m01 double
m10 double
m11 double
m20 double
m21 double

Returns

double3x2

double3x3(double3)

public static double3x3 double3x3(double3 value)

Parameters

value double3

Returns

double3x3

double3x3(double3, double3, double3)

public static double3x3 double3x3(double3 c0, double3 c1, double3 c2)

Parameters

c0 double3
c1 double3
c2 double3

Returns

double3x3

double3x3(double)

public static double3x3 double3x3(double value)

Parameters

value double

Returns

double3x3

double3x3(double, double, double, double, double, double, double, double, double)

public static double3x3 double3x3(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)

Parameters

m00 double
m01 double
m02 double
m10 double
m11 double
m12 double
m20 double
m21 double
m22 double

Returns

double3x3

double3x4(double3)

public static double3x4 double3x4(double3 value)

Parameters

value double3

Returns

double3x4

double3x4(double3, double3, double3, double3)

public static double3x4 double3x4(double3 c0, double3 c1, double3 c2, double3 c3)

Parameters

c0 double3
c1 double3
c2 double3
c3 double3

Returns

double3x4

double3x4(double)

public static double3x4 double3x4(double value)

Parameters

value double

Returns

double3x4

double3x4(double, double, double, double, double, double, double, double, double, double, double, double)

public static double3x4 double3x4(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23)

Parameters

m00 double
m01 double
m02 double
m03 double
m10 double
m11 double
m12 double
m13 double
m20 double
m21 double
m22 double
m23 double

Returns

double3x4

double4(bool4)

public static double4 double4(bool4 v)

Parameters

v bool4

Returns

double4

double4(double2, double2)

public static double4 double4(double2 xy, double2 zw)

Parameters

xy double2
zw double2

Returns

double4

double4(double2, double, double)

public static double4 double4(double2 xy, double z, double w)

Parameters

xy double2
z double
w double

Returns

double4

double4(double3, double)

public static double4 double4(double3 xyz, double w)

Parameters

xyz double3
w double

Returns

double4

double4(float4)

public static double4 double4(float4 v)

Parameters

v float4

Returns

double4

double4(int4)

public static double4 double4(int4 v)

Parameters

v int4

Returns

double4

double4(uint4)

public static double4 double4(uint4 v)

Parameters

v uint4

Returns

double4

double4(double)

public static double4 double4(double value)

Parameters

value double

Returns

double4

double4(double, double2, double)

public static double4 double4(double x, double2 yz, double w)

Parameters

x double
yz double2
w double

Returns

double4

double4(double, double3)

public static double4 double4(double x, double3 yzw)

Parameters

x double
yzw double3

Returns

double4

double4(double, double, double2)

public static double4 double4(double x, double y, double2 zw)

Parameters

x double
y double
zw double2

Returns

double4

double4(double, double, double, double)

public static double4 double4(double x, double y, double z, double w)

Parameters

x double
y double
z double
w double

Returns

double4

double4(int)

public static double4 double4(int v)

Parameters

v int

Returns

double4

double4(float)

public static double4 double4(float v)

Parameters

v float

Returns

double4

double4(uint)

public static double4 double4(uint v)

Parameters

v uint

Returns

double4

double4x2(double4)

public static double4x2 double4x2(double4 value)

Parameters

value double4

Returns

double4x2

double4x2(double4, double4)

public static double4x2 double4x2(double4 c0, double4 c1)

Parameters

c0 double4
c1 double4

Returns

double4x2

double4x2(double)

public static double4x2 double4x2(double value)

Parameters

value double

Returns

double4x2

double4x2(double, double, double, double, double, double, double, double)

public static double4x2 double4x2(double m00, double m01, double m10, double m11, double m20, double m21, double m30, double m31)

Parameters

m00 double
m01 double
m10 double
m11 double
m20 double
m21 double
m30 double
m31 double

Returns

double4x2

double4x3(double4)

public static double4x3 double4x3(double4 value)

Parameters

value double4

Returns

double4x3

double4x3(double4, double4, double4)

public static double4x3 double4x3(double4 c0, double4 c1, double4 c2)

Parameters

c0 double4
c1 double4
c2 double4

Returns

double4x3

double4x3(double)

public static double4x3 double4x3(double value)

Parameters

value double

Returns

double4x3

double4x3(double, double, double, double, double, double, double, double, double, double, double, double)

public static double4x3 double4x3(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22, double m30, double m31, double m32)

Parameters

m00 double
m01 double
m02 double
m10 double
m11 double
m12 double
m20 double
m21 double
m22 double
m30 double
m31 double
m32 double

Returns

double4x3

double4x4(double4)

public static double4x4 double4x4(double4 value)

Parameters

value double4

Returns

double4x4

double4x4(double4, double4, double4, double4)

public static double4x4 double4x4(double4 c0, double4 c1, double4 c2, double4 c3)

Parameters

c0 double4
c1 double4
c2 double4
c3 double4

Returns

double4x4

double4x4(double)

public static double4x4 double4x4(double value)

Parameters

value double

Returns

double4x4

double4x4(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)

public static double4x4 double4x4(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23, double m30, double m31, double m32, double m33)

Parameters

m00 double
m01 double
m02 double
m03 double
m10 double
m11 double
m12 double
m13 double
m20 double
m21 double
m22 double
m23 double
m30 double
m31 double
m32 double
m33 double

Returns

double4x4

down()

Unity's down axis (0, -1, 0).

public static float3 down()

Returns

float3

The down axis.

Remarks

exp(double2)

Returns the componentwise base-e exponential of x.

public static double2 exp(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise base-e exponential of the input.

exp(double3)

Returns the componentwise base-e exponential of x.

public static double3 exp(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise base-e exponential of the input.

exp(double4)

Returns the componentwise base-e exponential of x.

public static double4 exp(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise base-e exponential of the input.

exp(float2)

Returns the componentwise base-e exponential of x.

public static float2 exp(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise base-e exponential of the input.

exp(float3)

Returns the componentwise base-e exponential of x.

public static float3 exp(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise base-e exponential of the input.

exp(float4)

Returns the componentwise base-e exponential of x.

public static float4 exp(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise base-e exponential of the input.

exp(quaternion)

Returns the natural exponent of a quaternion.

public static quaternion exp(quaternion q)

Parameters

q quaternion

The quaternion.

Returns

quaternion

The natural exponent of the input quaternion.

exp(double)

Returns the base-e exponential of x.

public static double exp(double x)

Parameters

x double

Input value.

Returns

double

The base-e exponential of the input.

exp(float)

Returns the base-e exponential of x.

public static float exp(float x)

Parameters

x float

Input value.

Returns

float

The base-e exponential of the input.

exp10(double2)

Returns the componentwise base-10 exponential of x.

public static double2 exp10(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise base-10 exponential of the input.

exp10(double3)

Returns the componentwise base-10 exponential of x.

public static double3 exp10(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise base-10 exponential of the input.

exp10(double4)

Returns the componentwise base-10 exponential of x.

public static double4 exp10(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise base-10 exponential of the input.

exp10(float2)

Returns the componentwise base-10 exponential of x.

public static float2 exp10(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise base-10 exponential of the input.

exp10(float3)

Returns the componentwise base-10 exponential of x.

public static float3 exp10(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise base-10 exponential of the input.

exp10(float4)

Returns the componentwise base-10 exponential of x.

public static float4 exp10(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise base-10 exponential of the input.

exp10(double)

Returns the base-10 exponential of x.

public static double exp10(double x)

Parameters

x double

Input value.

Returns

double

The base-10 exponential of the input.

exp10(float)

Returns the base-10 exponential of x.

public static float exp10(float x)

Parameters

x float

Input value.

Returns

float

The base-10 exponential of the input.

exp2(double2)

Returns the componentwise base-2 exponential of x.

public static double2 exp2(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise base-2 exponential of the input.

exp2(double3)

Returns the componentwise base-2 exponential of x.

public static double3 exp2(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise base-2 exponential of the input.

exp2(double4)

Returns the componentwise base-2 exponential of x.

public static double4 exp2(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise base-2 exponential of the input.

exp2(float2)

Returns the componentwise base-2 exponential of x.

public static float2 exp2(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise base-2 exponential of the input.

exp2(float3)

Returns the componentwise base-2 exponential of x.

public static float3 exp2(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise base-2 exponential of the input.

exp2(float4)

Returns the componentwise base-2 exponential of x.

public static float4 exp2(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise base-2 exponential of the input.

exp2(double)

Returns the base-2 exponential of x.

public static double exp2(double x)

Parameters

x double

Input value.

Returns

double

The base-2 exponential of the input.

exp2(float)

Returns the base-2 exponential of x.

public static float exp2(float x)

Parameters

x float

Input value.

Returns

float

The base-2 exponential of the input.

faceforward(double2, double2, double2)

Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise.

public static double2 faceforward(double2 n, double2 i, double2 ng)

Parameters

n double2

Vector to conditionally flip.

i double2

First vector in direction comparison.

ng double2

Second vector in direction comparison.

Returns

double2

-n if i and ng point in the same direction; otherwise return n unchanged.

faceforward(double3, double3, double3)

Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise.

public static double3 faceforward(double3 n, double3 i, double3 ng)

Parameters

n double3

Vector to conditionally flip.

i double3

First vector in direction comparison.

ng double3

Second vector in direction comparison.

Returns

double3

-n if i and ng point in the same direction; otherwise return n unchanged.

faceforward(double4, double4, double4)

Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise.

public static double4 faceforward(double4 n, double4 i, double4 ng)

Parameters

n double4

Vector to conditionally flip.

i double4

First vector in direction comparison.

ng double4

Second vector in direction comparison.

Returns

double4

-n if i and ng point in the same direction; otherwise return n unchanged.

faceforward(float2, float2, float2)

Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise.

public static float2 faceforward(float2 n, float2 i, float2 ng)

Parameters

n float2

Vector to conditionally flip.

i float2

First vector in direction comparison.

ng float2

Second vector in direction comparison.

Returns

float2

-n if i and ng point in the same direction; otherwise return n unchanged.

faceforward(float3, float3, float3)

Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise.

public static float3 faceforward(float3 n, float3 i, float3 ng)

Parameters

n float3

Vector to conditionally flip.

i float3

First vector in direction comparison.

ng float3

Second vector in direction comparison.

Returns

float3

-n if i and ng point in the same direction; otherwise return n unchanged.

faceforward(float4, float4, float4)

Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise.

public static float4 faceforward(float4 n, float4 i, float4 ng)

Parameters

n float4

Vector to conditionally flip.

i float4

First vector in direction comparison.

ng float4

Second vector in direction comparison.

Returns

float4

-n if i and ng point in the same direction; otherwise return n unchanged.

fastinverse(double4x4)

public static double4x4 fastinverse(double4x4 m)

Parameters

m double4x4

Returns

double4x4

fastinverse(float4x4)

public static float4x4 fastinverse(float4x4 m)

Parameters

m float4x4

Returns

float4x4

float2(bool2)

public static float2 float2(bool2 v)

Parameters

v bool2

Returns

float2

float2(double2)

public static float2 float2(double2 v)

Parameters

v double2

Returns

float2

float2(float2)

public static float2 float2(float2 xy)

Parameters

xy float2

Returns

float2

float2(int2)

public static float2 float2(int2 v)

Parameters

v int2

Returns

float2

float2(uint2)

public static float2 float2(uint2 v)

Parameters

v uint2

Returns

float2

float2(double)

public static float2 float2(double v)

Parameters

v double

Returns

float2

float2(int)

public static float2 float2(int v)

Parameters

v int

Returns

float2

float2(float)

public static float2 float2(float value)

Parameters

value float

Returns

float2

float2(float, float)

public static float2 float2(float x, float y)

Parameters

x float
y float

Returns

float2

float2(uint)

public static float2 float2(uint v)

Parameters

v uint

Returns

float2

float2x2(double2x2)

public static float2x2 float2x2(double2x2 v)

Parameters

v double2x2

Returns

float2x2

float2x2(float2)

public static float2x2 float2x2(float2 value)

Parameters

value float2

Returns

float2x2

float2x2(float2, float2)

public static float2x2 float2x2(float2 c0, float2 c1)

Parameters

c0 float2
c1 float2

Returns

float2x2

float2x2(int2x2)

public static float2x2 float2x2(int2x2 v)

Parameters

v int2x2

Returns

float2x2

float2x2(uint2x2)

public static float2x2 float2x2(uint2x2 v)

Parameters

v uint2x2

Returns

float2x2

float2x2(float)

public static float2x2 float2x2(float value)

Parameters

value float

Returns

float2x2

float2x2(float, float, float, float)

public static float2x2 float2x2(float m00, float m01, float m10, float m11)

Parameters

m00 float
m01 float
m10 float
m11 float

Returns

float2x2

float2x3(double2x3)

public static float2x3 float2x3(double2x3 v)

Parameters

v double2x3

Returns

float2x3

float2x3(float2)

public static float2x3 float2x3(float2 value)

Parameters

value float2

Returns

float2x3

float2x3(float2, float2, float2)

public static float2x3 float2x3(float2 c0, float2 c1, float2 c2)

Parameters

c0 float2
c1 float2
c2 float2

Returns

float2x3

float2x3(int2x3)

public static float2x3 float2x3(int2x3 v)

Parameters

v int2x3

Returns

float2x3

float2x3(uint2x3)

public static float2x3 float2x3(uint2x3 v)

Parameters

v uint2x3

Returns

float2x3

float2x3(float)

public static float2x3 float2x3(float value)

Parameters

value float

Returns

float2x3

float2x3(float, float, float, float, float, float)

public static float2x3 float2x3(float m00, float m01, float m02, float m10, float m11, float m12)

Parameters

m00 float
m01 float
m02 float
m10 float
m11 float
m12 float

Returns

float2x3

float2x4(double2x4)

public static float2x4 float2x4(double2x4 v)

Parameters

v double2x4

Returns

float2x4

float2x4(float2)

public static float2x4 float2x4(float2 value)

Parameters

value float2

Returns

float2x4

float2x4(float2, float2, float2, float2)

public static float2x4 float2x4(float2 c0, float2 c1, float2 c2, float2 c3)

Parameters

c0 float2
c1 float2
c2 float2
c3 float2

Returns

float2x4

float2x4(int2x4)

public static float2x4 float2x4(int2x4 v)

Parameters

v int2x4

Returns

float2x4

float2x4(uint2x4)

public static float2x4 float2x4(uint2x4 v)

Parameters

v uint2x4

Returns

float2x4

float2x4(float)

public static float2x4 float2x4(float value)

Parameters

value float

Returns

float2x4

float2x4(float, float, float, float, float, float, float, float)

public static float2x4 float2x4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13)

Parameters

m00 float
m01 float
m02 float
m03 float
m10 float
m11 float
m12 float
m13 float

Returns

float2x4

float3(bool3)

public static float3 float3(bool3 v)

Parameters

v bool3

Returns

float3

float3(double3)

public static float3 float3(double3 v)

Parameters

v double3

Returns

float3

float3(float2, float)

public static float3 float3(float2 xy, float z)

Parameters

xy float2
z float

Returns

float3

float3(float3)

public static float3 float3(float3 xyz)

Parameters

xyz float3

Returns

float3

float3(int3)

public static float3 float3(int3 v)

Parameters

v int3

Returns

float3

float3(uint3)

public static float3 float3(uint3 v)

Parameters

v uint3

Returns

float3

float3(double)

public static float3 float3(double v)

Parameters

v double

Returns

float3

float3(int)

public static float3 float3(int v)

Parameters

v int

Returns

float3

float3(float)

public static float3 float3(float value)

Parameters

value float

Returns

float3

float3(float, float2)

public static float3 float3(float x, float2 yz)

Parameters

x float
yz float2

Returns

float3

float3(float, float, float)

public static float3 float3(float x, float y, float z)

Parameters

x float
y float
z float

Returns

float3

float3(uint)

public static float3 float3(uint v)

Parameters

v uint

Returns

float3

float3x2(double3x2)

public static float3x2 float3x2(double3x2 v)

Parameters

v double3x2

Returns

float3x2

float3x2(float3)

public static float3x2 float3x2(float3 value)

Parameters

value float3

Returns

float3x2

float3x2(float3, float3)

public static float3x2 float3x2(float3 c0, float3 c1)

Parameters

c0 float3
c1 float3

Returns

float3x2

float3x2(int3x2)

public static float3x2 float3x2(int3x2 v)

Parameters

v int3x2

Returns

float3x2

float3x2(uint3x2)

public static float3x2 float3x2(uint3x2 v)

Parameters

v uint3x2

Returns

float3x2

float3x2(float)

public static float3x2 float3x2(float value)

Parameters

value float

Returns

float3x2

float3x2(float, float, float, float, float, float)

public static float3x2 float3x2(float m00, float m01, float m10, float m11, float m20, float m21)

Parameters

m00 float
m01 float
m10 float
m11 float
m20 float
m21 float

Returns

float3x2

float3x3(double3x3)

public static float3x3 float3x3(double3x3 v)

Parameters

v double3x3

Returns

float3x3

float3x3(float3)

public static float3x3 float3x3(float3 value)

Parameters

value float3

Returns

float3x3

float3x3(float3, float3, float3)

public static float3x3 float3x3(float3 c0, float3 c1, float3 c2)

Parameters

c0 float3
c1 float3
c2 float3

Returns

float3x3

float3x3(int3x3)

public static float3x3 float3x3(int3x3 v)

Parameters

v int3x3

Returns

float3x3

float3x3(uint3x3)

public static float3x3 float3x3(uint3x3 v)

Parameters

v uint3x3

Returns

float3x3

float3x3(float)

public static float3x3 float3x3(float value)

Parameters

value float

Returns

float3x3

float3x3(float, float, float, float, float, float, float, float, float)

public static float3x3 float3x3(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)

Parameters

m00 float
m01 float
m02 float
m10 float
m11 float
m12 float
m20 float
m21 float
m22 float

Returns

float3x3

float3x4(double3x4)

public static float3x4 float3x4(double3x4 v)

Parameters

v double3x4

Returns

float3x4

float3x4(float3)

public static float3x4 float3x4(float3 value)

Parameters

value float3

Returns

float3x4

float3x4(float3, float3, float3, float3)

public static float3x4 float3x4(float3 c0, float3 c1, float3 c2, float3 c3)

Parameters

c0 float3
c1 float3
c2 float3
c3 float3

Returns

float3x4

float3x4(int3x4)

public static float3x4 float3x4(int3x4 v)

Parameters

v int3x4

Returns

float3x4

float3x4(uint3x4)

public static float3x4 float3x4(uint3x4 v)

Parameters

v uint3x4

Returns

float3x4

float3x4(float)

public static float3x4 float3x4(float value)

Parameters

value float

Returns

float3x4

float3x4(float, float, float, float, float, float, float, float, float, float, float, float)

public static float3x4 float3x4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23)

Parameters

m00 float
m01 float
m02 float
m03 float
m10 float
m11 float
m12 float
m13 float
m20 float
m21 float
m22 float
m23 float

Returns

float3x4

float4(bool4)

public static float4 float4(bool4 v)

Parameters

v bool4

Returns

float4

float4(double4)

public static float4 float4(double4 v)

Parameters

v double4

Returns

float4

float4(float2, float2)

public static float4 float4(float2 xy, float2 zw)

Parameters

xy float2
zw float2

Returns

float4

float4(float2, float, float)

public static float4 float4(float2 xy, float z, float w)

Parameters

xy float2
z float
w float

Returns

float4

float4(float3, float)

public static float4 float4(float3 xyz, float w)

Parameters

xyz float3
w float

Returns

float4

float4(int4)

public static float4 float4(int4 v)

Parameters

v int4

Returns

float4

float4(uint4)

public static float4 float4(uint4 v)

Parameters

v uint4

Returns

float4

float4(double)

public static float4 float4(double v)

Parameters

v double

Returns

float4

float4(int)

public static float4 float4(int v)

Parameters

v int

Returns

float4

float4(float)

public static float4 float4(float value)

Parameters

value float

Returns

float4

float4(float, float2, float)

public static float4 float4(float x, float2 yz, float w)

Parameters

x float
yz float2
w float

Returns

float4

float4(float, float3)

public static float4 float4(float x, float3 yzw)

Parameters

x float
yzw float3

Returns

float4

float4(float, float, float2)

public static float4 float4(float x, float y, float2 zw)

Parameters

x float
y float
zw float2

Returns

float4

float4(float, float, float, float)

public static float4 float4(float x, float y, float z, float w)

Parameters

x float
y float
z float
w float

Returns

float4

float4(uint)

public static float4 float4(uint v)

Parameters

v uint

Returns

float4

float4x2(double4x2)

public static float4x2 float4x2(double4x2 v)

Parameters

v double4x2

Returns

float4x2

float4x2(float4)

public static float4x2 float4x2(float4 value)

Parameters

value float4

Returns

float4x2

float4x2(float4, float4)

public static float4x2 float4x2(float4 c0, float4 c1)

Parameters

c0 float4
c1 float4

Returns

float4x2

float4x2(int4x2)

public static float4x2 float4x2(int4x2 v)

Parameters

v int4x2

Returns

float4x2

float4x2(uint4x2)

public static float4x2 float4x2(uint4x2 v)

Parameters

v uint4x2

Returns

float4x2

float4x2(float)

public static float4x2 float4x2(float value)

Parameters

value float

Returns

float4x2

float4x2(float, float, float, float, float, float, float, float)

public static float4x2 float4x2(float m00, float m01, float m10, float m11, float m20, float m21, float m30, float m31)

Parameters

m00 float
m01 float
m10 float
m11 float
m20 float
m21 float
m30 float
m31 float

Returns

float4x2

float4x3(double4x3)

public static float4x3 float4x3(double4x3 v)

Parameters

v double4x3

Returns

float4x3

float4x3(float4)

public static float4x3 float4x3(float4 value)

Parameters

value float4

Returns

float4x3

float4x3(float4, float4, float4)

public static float4x3 float4x3(float4 c0, float4 c1, float4 c2)

Parameters

c0 float4
c1 float4
c2 float4

Returns

float4x3

float4x3(int4x3)

public static float4x3 float4x3(int4x3 v)

Parameters

v int4x3

Returns

float4x3

float4x3(uint4x3)

public static float4x3 float4x3(uint4x3 v)

Parameters

v uint4x3

Returns

float4x3

float4x3(float)

public static float4x3 float4x3(float value)

Parameters

value float

Returns

float4x3

float4x3(float, float, float, float, float, float, float, float, float, float, float, float)

public static float4x3 float4x3(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22, float m30, float m31, float m32)

Parameters

m00 float
m01 float
m02 float
m10 float
m11 float
m12 float
m20 float
m21 float
m22 float
m30 float
m31 float
m32 float

Returns

float4x3

float4x4(double4x4)

public static float4x4 float4x4(double4x4 v)

Parameters

v double4x4

Returns

float4x4

float4x4(float4)

public static float4x4 float4x4(float4 value)

Parameters

value float4

Returns

float4x4

float4x4(float4, float4, float4, float4)

public static float4x4 float4x4(float4 c0, float4 c1, float4 c2, float4 c3)

Parameters

c0 float4
c1 float4
c2 float4
c3 float4

Returns

float4x4

float4x4(int4x4)

public static float4x4 float4x4(int4x4 v)

Parameters

v int4x4

Returns

float4x4

float4x4(uint4x4)

public static float4x4 float4x4(uint4x4 v)

Parameters

v uint4x4

Returns

float4x4

float4x4(float)

public static float4x4 float4x4(float value)

Parameters

value float

Returns

float4x4

float4x4(float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)

public static float4x4 float4x4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33)

Parameters

m00 float
m01 float
m02 float
m03 float
m10 float
m11 float
m12 float
m13 float
m20 float
m21 float
m22 float
m23 float
m30 float
m31 float
m32 float
m33 float

Returns

float4x4

floor(double2)

Returns the result of rounding each component of a double2 vector value down to the nearest value less or equal to the original value.

public static double2 floor(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise round down to nearest integral value of the input.

floor(double3)

Returns the result of rounding each component of a double3 vector value down to the nearest value less or equal to the original value.

public static double3 floor(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise round down to nearest integral value of the input.

floor(double4)

Returns the result of rounding each component of a double4 vector value down to the nearest value less or equal to the original value.

public static double4 floor(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise round down to nearest integral value of the input.

floor(float2)

Returns the result of rounding each component of a float2 vector value down to the nearest value less or equal to the original value.

public static float2 floor(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise round down to nearest integral value of the input.

floor(float3)

Returns the result of rounding each component of a float3 vector value down to the nearest value less or equal to the original value.

public static float3 floor(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise round down to nearest integral value of the input.

floor(float4)

Returns the result of rounding each component of a float4 vector value down to the nearest value less or equal to the original value.

public static float4 floor(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise round down to nearest integral value of the input.

floor(double)

Returns the result of rounding a double value up to the nearest integral value less or equal to the original value.

public static double floor(double x)

Parameters

x double

Input value.

Returns

double

The round down to nearest integral value of the input.

floor(float)

Returns the result of rounding a float value up to the nearest integral value less or equal to the original value.

public static float floor(float x)

Parameters

x float

Input value.

Returns

float

The round down to nearest integral value of the input.

floorlog2(int2)

Computes the componentwise floor of the base-2 logarithm of x.

public static int2 floorlog2(int2 x)

Parameters

x int2

int2 to be used as input.

Returns

int2

Componentwise floor of base-2 logarithm of x.

Remarks

Components of x must be greater than zero, otherwise the result of the component is undefined.

floorlog2(int3)

Computes the componentwise floor of the base-2 logarithm of x.

public static int3 floorlog2(int3 x)

Parameters

x int3

int3 to be used as input.

Returns

int3

Componentwise floor of base-2 logarithm of x.

Remarks

Components of x must be greater than zero, otherwise the result of the component is undefined.

floorlog2(int4)

Computes the componentwise floor of the base-2 logarithm of x.

public static int4 floorlog2(int4 x)

Parameters

x int4

int4 to be used as input.

Returns

int4

Componentwise floor of base-2 logarithm of x.

Remarks

Components of x must be greater than zero, otherwise the result of the component is undefined.

floorlog2(uint2)

Computes the componentwise floor of the base-2 logarithm of x.

public static int2 floorlog2(uint2 x)

Parameters

x uint2

uint2 to be used as input.

Returns

int2

Componentwise floor of base-2 logarithm of x.

Remarks

Components of x must be greater than zero, otherwise the result of the component is undefined.

floorlog2(uint3)

Computes the componentwise floor of the base-2 logarithm of x.

public static int3 floorlog2(uint3 x)

Parameters

x uint3

uint3 to be used as input.

Returns

int3

Componentwise floor of base-2 logarithm of x.

Remarks

Components of x must be greater than zero, otherwise the result of the component is undefined.

floorlog2(uint4)

Computes the componentwise floor of the base-2 logarithm of x.

public static int4 floorlog2(uint4 x)

Parameters

x uint4

uint4 to be used as input.

Returns

int4

Componentwise floor of base-2 logarithm of x.

Remarks

Components of x must be greater than zero, otherwise the result of the component is undefined.

floorlog2(int)

Computes the floor of the base-2 logarithm of x.

public static int floorlog2(int x)

Parameters

x int

Integer to be used as input.

Returns

int

Floor of base-2 logarithm of x.

Remarks

x must be greater than zero, otherwise the result is undefined.

floorlog2(uint)

Computes the floor of the base-2 logarithm of x.

public static int floorlog2(uint x)

Parameters

x uint

Unsigned integer to be used as input.

Returns

int

Floor of base-2 logarithm of x.

Remarks

x must be greater than zero, otherwise the result is undefined.

fmod(double2, double2)

Returns the componentwise double precision floating point remainder of x/y.

public static double2 fmod(double2 x, double2 y)

Parameters

x double2

The dividend in x/y.

y double2

The divisor in x/y.

Returns

double2

The componentwise remainder of x/y.

fmod(double3, double3)

Returns the componentwise double precision floating point remainder of x/y.

public static double3 fmod(double3 x, double3 y)

Parameters

x double3

The dividend in x/y.

y double3

The divisor in x/y.

Returns

double3

The componentwise remainder of x/y.

fmod(double4, double4)

Returns the componentwise double precision floating point remainder of x/y.

public static double4 fmod(double4 x, double4 y)

Parameters

x double4

The dividend in x/y.

y double4

The divisor in x/y.

Returns

double4

The componentwise remainder of x/y.

fmod(float2, float2)

Returns the componentwise floating point remainder of x/y.

public static float2 fmod(float2 x, float2 y)

Parameters

x float2

The dividend in x/y.

y float2

The divisor in x/y.

Returns

float2

The componentwise remainder of x/y.

fmod(float3, float3)

Returns the componentwise floating point remainder of x/y.

public static float3 fmod(float3 x, float3 y)

Parameters

x float3

The dividend in x/y.

y float3

The divisor in x/y.

Returns

float3

The componentwise remainder of x/y.

fmod(float4, float4)

Returns the componentwise floating point remainder of x/y.

public static float4 fmod(float4 x, float4 y)

Parameters

x float4

The dividend in x/y.

y float4

The divisor in x/y.

Returns

float4

The componentwise remainder of x/y.

fmod(double, double)

Returns the double precision floating point remainder of x/y.

public static double fmod(double x, double y)

Parameters

x double

The dividend in x/y.

y double

The divisor in x/y.

Returns

double

The remainder of x/y.

fmod(float, float)

Returns the floating point remainder of x/y.

public static float fmod(float x, float y)

Parameters

x float

The dividend in x/y.

y float

The divisor in x/y.

Returns

float

The remainder of x/y.

forward()

Unity's forward axis (0, 0, 1).

public static float3 forward()

Returns

float3

The forward axis.

Remarks

frac(double2)

Returns the componentwise fractional parts of a double2 vector.

public static double2 frac(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise fractional part of the input.

frac(double3)

Returns the componentwise fractional parts of a double3 vector.

public static double3 frac(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise fractional part of the input.

frac(double4)

Returns the componentwise fractional parts of a double4 vector.

public static double4 frac(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise fractional part of the input.

frac(float2)

Returns the componentwise fractional parts of a float2 vector.

public static float2 frac(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise fractional part of the input.

frac(float3)

Returns the componentwise fractional parts of a float3 vector.

public static float3 frac(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise fractional part of the input.

frac(float4)

Returns the componentwise fractional parts of a float4 vector.

public static float4 frac(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise fractional part of the input.

frac(double)

Returns the fractional part of a double value.

public static double frac(double x)

Parameters

x double

Input value.

Returns

double

The fractional part of the input.

frac(float)

Returns the fractional part of a float value.

public static float frac(float x)

Parameters

x float

Input value.

Returns

float

The fractional part of the input.

hash(quaternion)

Returns a uint hash code of a quaternion.

public static uint hash(quaternion q)

Parameters

q quaternion

The quaternion to hash.

Returns

uint

The hash code for the input quaternion.

hash(void*, int, uint)

Returns a uint hash from a block of memory using the xxhash32 algorithm. Can only be used in an unsafe context.

public static uint hash(void* pBuffer, int numBytes, uint seed = 0)

Parameters

pBuffer void*

A pointer to the beginning of the data.

numBytes int

Number of bytes to hash.

seed uint

Starting seed value.

Returns

uint

The 32 bit hash of the input data buffer.

hashwide(quaternion)

Returns a uint4 vector hash code of a quaternion. When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash that are only reduced to a narrow uint hash at the very end instead of at every step.

public static uint4 hashwide(quaternion q)

Parameters

q quaternion

The quaternion to hash.

Returns

uint4

The uint4 vector hash code of the input quaternion.

int2(bool2)

public static int2 int2(bool2 v)

Parameters

v bool2

Returns

int2

int2(double2)

public static int2 int2(double2 v)

Parameters

v double2

Returns

int2

int2(float2)

public static int2 int2(float2 v)

Parameters

v float2

Returns

int2

int2(int2)

public static int2 int2(int2 xy)

Parameters

xy int2

Returns

int2

int2(uint2)

public static int2 int2(uint2 v)

Parameters

v uint2

Returns

int2

int2(double)

public static int2 int2(double v)

Parameters

v double

Returns

int2

int2(int)

public static int2 int2(int value)

Parameters

value int

Returns

int2

int2(int, int)

public static int2 int2(int x, int y)

Parameters

x int
y int

Returns

int2

int2(float)

public static int2 int2(float v)

Parameters

v float

Returns

int2

int2(uint)

public static int2 int2(uint v)

Parameters

v uint

Returns

int2

int2x2(int2)

public static int2x2 int2x2(int2 value)

Parameters

value int2

Returns

int2x2

int2x2(int2, int2)

public static int2x2 int2x2(int2 c0, int2 c1)

Parameters

c0 int2
c1 int2

Returns

int2x2

int2x2(int)

public static int2x2 int2x2(int value)

Parameters

value int

Returns

int2x2

int2x2(int, int, int, int)

public static int2x2 int2x2(int m00, int m01, int m10, int m11)

Parameters

m00 int
m01 int
m10 int
m11 int

Returns

int2x2

int2x3(int2)

public static int2x3 int2x3(int2 value)

Parameters

value int2

Returns

int2x3

int2x3(int2, int2, int2)

public static int2x3 int2x3(int2 c0, int2 c1, int2 c2)

Parameters

c0 int2
c1 int2
c2 int2

Returns

int2x3

int2x3(int)

public static int2x3 int2x3(int value)

Parameters

value int

Returns

int2x3

int2x3(int, int, int, int, int, int)

public static int2x3 int2x3(int m00, int m01, int m02, int m10, int m11, int m12)

Parameters

m00 int
m01 int
m02 int
m10 int
m11 int
m12 int

Returns

int2x3

int2x4(int2)

public static int2x4 int2x4(int2 value)

Parameters

value int2

Returns

int2x4

int2x4(int2, int2, int2, int2)

public static int2x4 int2x4(int2 c0, int2 c1, int2 c2, int2 c3)

Parameters

c0 int2
c1 int2
c2 int2
c3 int2

Returns

int2x4

int2x4(int)

public static int2x4 int2x4(int value)

Parameters

value int

Returns

int2x4

int2x4(int, int, int, int, int, int, int, int)

public static int2x4 int2x4(int m00, int m01, int m02, int m03, int m10, int m11, int m12, int m13)

Parameters

m00 int
m01 int
m02 int
m03 int
m10 int
m11 int
m12 int
m13 int

Returns

int2x4

int3(bool3)

public static int3 int3(bool3 v)

Parameters

v bool3

Returns

int3

int3(double3)

public static int3 int3(double3 v)

Parameters

v double3

Returns

int3

int3(float3)

public static int3 int3(float3 v)

Parameters

v float3

Returns

int3

int3(int2, int)

public static int3 int3(int2 xy, int z)

Parameters

xy int2
z int

Returns

int3

int3(int3)

public static int3 int3(int3 xyz)

Parameters

xyz int3

Returns

int3

int3(uint3)

public static int3 int3(uint3 v)

Parameters

v uint3

Returns

int3

int3(double)

public static int3 int3(double v)

Parameters

v double

Returns

int3

int3(int)

public static int3 int3(int value)

Parameters

value int

Returns

int3

int3(int, int2)

public static int3 int3(int x, int2 yz)

Parameters

x int
yz int2

Returns

int3

int3(int, int, int)

public static int3 int3(int x, int y, int z)

Parameters

x int
y int
z int

Returns

int3

int3(float)

public static int3 int3(float v)

Parameters

v float

Returns

int3

int3(uint)

public static int3 int3(uint v)

Parameters

v uint

Returns

int3

int3x2(int3)

public static int3x2 int3x2(int3 value)

Parameters

value int3

Returns

int3x2

int3x2(int3, int3)

public static int3x2 int3x2(int3 c0, int3 c1)

Parameters

c0 int3
c1 int3

Returns

int3x2

int3x2(int)

public static int3x2 int3x2(int value)

Parameters

value int

Returns

int3x2

int3x2(int, int, int, int, int, int)

public static int3x2 int3x2(int m00, int m01, int m10, int m11, int m20, int m21)

Parameters

m00 int
m01 int
m10 int
m11 int
m20 int
m21 int

Returns

int3x2

int3x3(int3)

public static int3x3 int3x3(int3 value)

Parameters

value int3

Returns

int3x3

int3x3(int3, int3, int3)

public static int3x3 int3x3(int3 c0, int3 c1, int3 c2)

Parameters

c0 int3
c1 int3
c2 int3

Returns

int3x3

int3x3(int)

public static int3x3 int3x3(int value)

Parameters

value int

Returns

int3x3

int3x3(int, int, int, int, int, int, int, int, int)

public static int3x3 int3x3(int m00, int m01, int m02, int m10, int m11, int m12, int m20, int m21, int m22)

Parameters

m00 int
m01 int
m02 int
m10 int
m11 int
m12 int
m20 int
m21 int
m22 int

Returns

int3x3

int3x4(int3)

public static int3x4 int3x4(int3 value)

Parameters

value int3

Returns

int3x4

int3x4(int3, int3, int3, int3)

public static int3x4 int3x4(int3 c0, int3 c1, int3 c2, int3 c3)

Parameters

c0 int3
c1 int3
c2 int3
c3 int3

Returns

int3x4

int3x4(int)

public static int3x4 int3x4(int value)

Parameters

value int

Returns

int3x4

int3x4(int, int, int, int, int, int, int, int, int, int, int, int)

public static int3x4 int3x4(int m00, int m01, int m02, int m03, int m10, int m11, int m12, int m13, int m20, int m21, int m22, int m23)

Parameters

m00 int
m01 int
m02 int
m03 int
m10 int
m11 int
m12 int
m13 int
m20 int
m21 int
m22 int
m23 int

Returns

int3x4

int4(bool4)

public static int4 int4(bool4 v)

Parameters

v bool4

Returns

int4

int4(double4)

public static int4 int4(double4 v)

Parameters

v double4

Returns

int4

int4(float4)

public static int4 int4(float4 v)

Parameters

v float4

Returns

int4

int4(int2, int2)

public static int4 int4(int2 xy, int2 zw)

Parameters

xy int2
zw int2

Returns

int4

int4(int2, int, int)

public static int4 int4(int2 xy, int z, int w)

Parameters

xy int2
z int
w int

Returns

int4

int4(int3, int)

public static int4 int4(int3 xyz, int w)

Parameters

xyz int3
w int

Returns

int4

int4(uint4)

public static int4 int4(uint4 v)

Parameters

v uint4

Returns

int4

int4(double)

public static int4 int4(double v)

Parameters

v double

Returns

int4

int4(int)

public static int4 int4(int value)

Parameters

value int

Returns

int4

int4(int, int2, int)

public static int4 int4(int x, int2 yz, int w)

Parameters

x int
yz int2
w int

Returns

int4

int4(int, int3)

public static int4 int4(int x, int3 yzw)

Parameters

x int
yzw int3

Returns

int4

int4(int, int, int2)

public static int4 int4(int x, int y, int2 zw)

Parameters

x int
y int
zw int2

Returns

int4

int4(int, int, int, int)

public static int4 int4(int x, int y, int z, int w)

Parameters

x int
y int
z int
w int

Returns

int4

int4(float)

public static int4 int4(float v)

Parameters

v float

Returns

int4

int4(uint)

public static int4 int4(uint v)

Parameters

v uint

Returns

int4

int4x2(int4)

public static int4x2 int4x2(int4 value)

Parameters

value int4

Returns

int4x2

int4x2(int4, int4)

public static int4x2 int4x2(int4 c0, int4 c1)

Parameters

c0 int4
c1 int4

Returns

int4x2

int4x2(int)

public static int4x2 int4x2(int value)

Parameters

value int

Returns

int4x2

int4x2(int, int, int, int, int, int, int, int)

public static int4x2 int4x2(int m00, int m01, int m10, int m11, int m20, int m21, int m30, int m31)

Parameters

m00 int
m01 int
m10 int
m11 int
m20 int
m21 int
m30 int
m31 int

Returns

int4x2

int4x3(int4)

public static int4x3 int4x3(int4 value)

Parameters

value int4

Returns

int4x3

int4x3(int4, int4, int4)

public static int4x3 int4x3(int4 c0, int4 c1, int4 c2)

Parameters

c0 int4
c1 int4
c2 int4

Returns

int4x3

int4x3(int)

public static int4x3 int4x3(int value)

Parameters

value int

Returns

int4x3

int4x3(int, int, int, int, int, int, int, int, int, int, int, int)

public static int4x3 int4x3(int m00, int m01, int m02, int m10, int m11, int m12, int m20, int m21, int m22, int m30, int m31, int m32)

Parameters

m00 int
m01 int
m02 int
m10 int
m11 int
m12 int
m20 int
m21 int
m22 int
m30 int
m31 int
m32 int

Returns

int4x3

int4x4(int4)

public static int4x4 int4x4(int4 value)

Parameters

value int4

Returns

int4x4

int4x4(int4, int4, int4, int4)

public static int4x4 int4x4(int4 c0, int4 c1, int4 c2, int4 c3)

Parameters

c0 int4
c1 int4
c2 int4
c3 int4

Returns

int4x4

int4x4(int)

public static int4x4 int4x4(int value)

Parameters

value int

Returns

int4x4

int4x4(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int)

public static int4x4 int4x4(int m00, int m01, int m02, int m03, int m10, int m11, int m12, int m13, int m20, int m21, int m22, int m23, int m30, int m31, int m32, int m33)

Parameters

m00 int
m01 int
m02 int
m03 int
m10 int
m11 int
m12 int
m13 int
m20 int
m21 int
m22 int
m23 int
m30 int
m31 int
m32 int
m33 int

Returns

int4x4

inverse(double2x2)

public static double2x2 inverse(double2x2 value)

Parameters

value double2x2

Returns

double2x2

inverse(double3x3)

public static double3x3 inverse(double3x3 value)

Parameters

value double3x3

Returns

double3x3

inverse(double4x4)

public static double4x4 inverse(double4x4 value)

Parameters

value double4x4

Returns

double4x4

inverse(float2x2)

public static float2x2 inverse(float2x2 value)

Parameters

value float2x2

Returns

float2x2

inverse(float3x3)

public static float3x3 inverse(float3x3 value)

Parameters

value float3x3

Returns

float3x3

inverse(float4x4)

public static float4x4 inverse(float4x4 value)

Parameters

value float4x4

Returns

float4x4

inverse(quaternion)

Returns the inverse of a quaternion value.

public static quaternion inverse(quaternion q)

Parameters

q quaternion

The quaternion to invert.

Returns

quaternion

The quaternion inverse of the input quaternion.

isfinite(double2)

Returns a bool2 indicating for each component of a double2 whether it is a finite floating point value.

public static bool2 isfinite(double2 x)

Parameters

x double2

The double2 value to test.

Returns

bool2

A bool2 where it is true in a component if that component is finite, false otherwise.

isfinite(double3)

Returns a bool3 indicating for each component of a double3 whether it is a finite floating point value.

public static bool3 isfinite(double3 x)

Parameters

x double3

The double3 value to test.

Returns

bool3

A bool3 where it is true in a component if that component is finite, false otherwise.

isfinite(double4)

Returns a bool4 indicating for each component of a double4 whether it is a finite floating point value.

public static bool4 isfinite(double4 x)

Parameters

x double4

The double4 value to test.

Returns

bool4

A bool4 where it is true in a component if that component is finite, false otherwise.

isfinite(float2)

Returns a bool2 indicating for each component of a float2 whether it is a finite floating point value.

public static bool2 isfinite(float2 x)

Parameters

x float2

The float2 value to test.

Returns

bool2

A bool2 where it is true in a component if that component is finite, false otherwise.

isfinite(float3)

Returns a bool3 indicating for each component of a float3 whether it is a finite floating point value.

public static bool3 isfinite(float3 x)

Parameters

x float3

The float3 value to test.

Returns

bool3

A bool3 where it is true in a component if that component is finite, false otherwise.

isfinite(float4)

Returns a bool4 indicating for each component of a float4 whether it is a finite floating point value.

public static bool4 isfinite(float4 x)

Parameters

x float4

The float4 value to test.

Returns

bool4

A bool4 where it is true in a component if that component is finite, false otherwise.

isfinite(double)

Returns true if the input double is a finite floating point value, false otherwise.

public static bool isfinite(double x)

Parameters

x double

The double value to test.

Returns

bool

True if the double is finite, false otherwise.

isfinite(float)

Returns true if the input float is a finite floating point value, false otherwise.

public static bool isfinite(float x)

Parameters

x float

The float value to test.

Returns

bool

True if the float is finite, false otherwise.

isinf(double2)

Returns a bool2 indicating for each component of a double2 whether it is an infinite floating point value.

public static bool2 isinf(double2 x)

Parameters

x double2

Input value.

Returns

bool2

True if the component was an infinite value; false otherwise.

isinf(double3)

Returns a bool3 indicating for each component of a double3 whether it is an infinite floating point value.

public static bool3 isinf(double3 x)

Parameters

x double3

Input value.

Returns

bool3

True if the component was an infinite value; false otherwise.

isinf(double4)

Returns a bool4 indicating for each component of a double4 whether it is an infinite floating point value.

public static bool4 isinf(double4 x)

Parameters

x double4

Input value.

Returns

bool4

True if the component was an infinite value; false otherwise.

isinf(float2)

Returns a bool2 indicating for each component of a float2 whether it is an infinite floating point value.

public static bool2 isinf(float2 x)

Parameters

x float2

Input value.

Returns

bool2

True if the component was an infinite value; false otherwise.

isinf(float3)

Returns a bool3 indicating for each component of a float3 whether it is an infinite floating point value.

public static bool3 isinf(float3 x)

Parameters

x float3

Input value.

Returns

bool3

True if the component was an infinite value; false otherwise.

isinf(float4)

Returns a bool4 indicating for each component of a float4 whether it is an infinite floating point value.

public static bool4 isinf(float4 x)

Parameters

x float4

Input value.

Returns

bool4

True if the component was an infinite value; false otherwise.

isinf(double)

Returns true if the input double is an infinite floating point value, false otherwise.

public static bool isinf(double x)

Parameters

x double

Input value.

Returns

bool

True if the input was an infinite value; false otherwise.

isinf(float)

Returns true if the input float is an infinite floating point value, false otherwise.

public static bool isinf(float x)

Parameters

x float

Input value.

Returns

bool

True if the input was an infinite value; false otherwise.

isnan(double2)

Returns a bool2 indicating for each component of a double2 whether it is a NaN (not a number) floating point value.

public static bool2 isnan(double2 x)

Parameters

x double2

Input value.

Returns

bool2

True if the component was NaN; false otherwise.

Remarks

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.

isnan(double3)

Returns a bool3 indicating for each component of a double3 whether it is a NaN (not a number) floating point value.

public static bool3 isnan(double3 x)

Parameters

x double3

Input value.

Returns

bool3

True if the component was NaN; false otherwise.

Remarks

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.

isnan(double4)

Returns a bool4 indicating for each component of a double4 whether it is a NaN (not a number) floating point value.

public static bool4 isnan(double4 x)

Parameters

x double4

Input value.

Returns

bool4

True if the component was NaN; false otherwise.

Remarks

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.

isnan(float2)

Returns a bool2 indicating for each component of a float2 whether it is a NaN (not a number) floating point value.

public static bool2 isnan(float2 x)

Parameters

x float2

Input value.

Returns

bool2

True if the component was NaN; false otherwise.

Remarks

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.

isnan(float3)

Returns a bool3 indicating for each component of a float3 whether it is a NaN (not a number) floating point value.

public static bool3 isnan(float3 x)

Parameters

x float3

Input value.

Returns

bool3

True if the component was NaN; false otherwise.

Remarks

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.

isnan(float4)

Returns a bool4 indicating for each component of a float4 whether it is a NaN (not a number) floating point value.

public static bool4 isnan(float4 x)

Parameters

x float4

Input value.

Returns

bool4

True if the component was NaN; false otherwise.

Remarks

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.

isnan(double)

Returns true if the input double is a NaN (not a number) floating point value, false otherwise.

public static bool isnan(double x)

Parameters

x double

Input value.

Returns

bool

True if the value was NaN; false otherwise.

Remarks

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.

isnan(float)

Returns true if the input float is a NaN (not a number) floating point value, false otherwise.

public static bool isnan(float x)

Parameters

x float

Input value.

Returns

bool

True if the value was NaN; false otherwise.

Remarks

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.

ispow2(int2)

Checks if each component of the input is a power of two.

public static bool2 ispow2(int2 x)

Parameters

x int2

int2 input

Returns

bool2

bool2 where true in a component indicates the same component in the input was a power of two.

Remarks

If a component of x is less than or equal to zero, then this function returns false in that component.

ispow2(int3)

Checks if each component of the input is a power of two.

public static bool3 ispow2(int3 x)

Parameters

x int3

int3 input

Returns

bool3

bool3 where true in a component indicates the same component in the input was a power of two.

Remarks

If a component of x is less than or equal to zero, then this function returns false in that component.

ispow2(int4)

Checks if each component of the input is a power of two.

public static bool4 ispow2(int4 x)

Parameters

x int4

int4 input

Returns

bool4

bool4 where true in a component indicates the same component in the input was a power of two.

Remarks

If a component of x is less than or equal to zero, then this function returns false in that component.

ispow2(uint2)

Checks if each component of the input is a power of two.

public static bool2 ispow2(uint2 x)

Parameters

x uint2

uint2 input

Returns

bool2

bool2 where true in a component indicates the same component in the input was a power of two.

Remarks

If a component of x is less than or equal to zero, then this function returns false in that component.

ispow2(uint3)

Checks if each component of the input is a power of two.

public static bool3 ispow2(uint3 x)

Parameters

x uint3

uint3 input

Returns

bool3

bool3 where true in a component indicates the same component in the input was a power of two.

Remarks

If a component of x is less than or equal to zero, then this function returns false in that component.

ispow2(uint4)

Checks if each component of the input is a power of two.

public static bool4 ispow2(uint4 x)

Parameters

x uint4

uint4 input

Returns

bool4

bool4 where true in a component indicates the same component in the input was a power of two.

Remarks

If a component of x is less than or equal to zero, then this function returns false in that component.

ispow2(int)

Checks if the input is a power of two.

public static bool ispow2(int x)

Parameters

x int

Integer input.

Returns

bool

bool where true indicates that input was a power of two.

Remarks

If x is less than or equal to zero, then this function returns false.

ispow2(uint)

Checks if the input is a power of two.

public static bool ispow2(uint x)

Parameters

x uint

Unsigned integer input.

Returns

bool

bool where true indicates that input was a power of two.

Remarks

If x is less than or equal to zero, then this function returns false.

left()

Unity's left axis (-1, 0, 0).

public static float3 left()

Returns

float3

The left axis.

Remarks

length(double2)

Returns the length of a double2 vector.

public static double length(double2 x)

Parameters

x double2

Vector to use when computing squared length.

Returns

double

Squared length of vector x.

length(double3)

Returns the length of a double3 vector.

public static double length(double3 x)

Parameters

x double3

Vector to use when computing squared length.

Returns

double

Squared length of vector x.

length(double4)

Returns the length of a double4 vector.

public static double length(double4 x)

Parameters

x double4

Vector to use when computing squared length.

Returns

double

Squared length of vector x.

length(float2)

Returns the length of a float2 vector.

public static float length(float2 x)

Parameters

x float2

Vector to use when computing length.

Returns

float

Length of vector x.

length(float3)

Returns the length of a float3 vector.

public static float length(float3 x)

Parameters

x float3

Vector to use when computing length.

Returns

float

Length of vector x.

length(float4)

Returns the length of a float4 vector.

public static float length(float4 x)

Parameters

x float4

Vector to use when computing length.

Returns

float

Length of vector x.

length(quaternion)

Returns the length of a quaternion.

public static float length(quaternion q)

Parameters

q quaternion

The input quaternion.

Returns

float

The length of the input quaternion.

length(double)

Returns the length of a double value. Equivalent to the absolute value.

public static double length(double x)

Parameters

x double

Value to use when computing squared length.

Returns

double

Squared length of x.

length(float)

Returns the length of a float value. Equivalent to the absolute value.

public static float length(float x)

Parameters

x float

Value to use when computing length.

Returns

float

Length of x.

lengthsq(double2)

Returns the squared length of a double2 vector.

public static double lengthsq(double2 x)

Parameters

x double2

Vector to use when computing squared length.

Returns

double

Squared length of vector x.

lengthsq(double3)

Returns the squared length of a double3 vector.

public static double lengthsq(double3 x)

Parameters

x double3

Vector to use when computing squared length.

Returns

double

Squared length of vector x.

lengthsq(double4)

Returns the squared length of a double4 vector.

public static double lengthsq(double4 x)

Parameters

x double4

Vector to use when computing squared length.

Returns

double

Squared length of vector x.

lengthsq(float2)

Returns the squared length of a float2 vector.

public static float lengthsq(float2 x)

Parameters

x float2

Vector to use when computing squared length.

Returns

float

Squared length of vector x.

lengthsq(float3)

Returns the squared length of a float3 vector.

public static float lengthsq(float3 x)

Parameters

x float3

Vector to use when computing squared length.

Returns

float

Squared length of vector x.

lengthsq(float4)

Returns the squared length of a float4 vector.

public static float lengthsq(float4 x)

Parameters

x float4

Vector to use when computing squared length.

Returns

float

Squared length of vector x.

lengthsq(quaternion)

Returns the squared length of a quaternion.

public static float lengthsq(quaternion q)

Parameters

q quaternion

The input quaternion.

Returns

float

The length squared of the input quaternion.

lengthsq(double)

Returns the squared length of a double value. Equivalent to squaring the value.

public static double lengthsq(double x)

Parameters

x double

Value to use when computing squared length.

Returns

double

Squared length of x.

lengthsq(float)

Returns the squared length of a float value. Equivalent to squaring the value.

public static float lengthsq(float x)

Parameters

x float

Value to use when computing squared length.

Returns

float

Squared length of x.

lerp(double2, double2, double2)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

public static double2 lerp(double2 start, double2 end, double2 t)

Parameters

start double2

The start point, corresponding to the interpolation parameter value of 0.

end double2

The end point, corresponding to the interpolation parameter value of 1.

t double2

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

double2

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(double2, double2, double)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

public static double2 lerp(double2 start, double2 end, double t)

Parameters

start double2

The start point, corresponding to the interpolation parameter value of 0.

end double2

The end point, corresponding to the interpolation parameter value of 1.

t double

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

double2

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(double3, double3, double3)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

public static double3 lerp(double3 start, double3 end, double3 t)

Parameters

start double3

The start point, corresponding to the interpolation parameter value of 0.

end double3

The end point, corresponding to the interpolation parameter value of 1.

t double3

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

double3

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(double3, double3, double)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

public static double3 lerp(double3 start, double3 end, double t)

Parameters

start double3

The start point, corresponding to the interpolation parameter value of 0.

end double3

The end point, corresponding to the interpolation parameter value of 1.

t double

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

double3

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(double4, double4, double4)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

public static double4 lerp(double4 start, double4 end, double4 t)

Parameters

start double4

The start point, corresponding to the interpolation parameter value of 0.

end double4

The end point, corresponding to the interpolation parameter value of 1.

t double4

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

double4

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(double4, double4, double)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

public static double4 lerp(double4 start, double4 end, double t)

Parameters

start double4

The start point, corresponding to the interpolation parameter value of 0.

end double4

The end point, corresponding to the interpolation parameter value of 1.

t double

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

double4

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(float2, float2, float2)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

public static float2 lerp(float2 start, float2 end, float2 t)

Parameters

start float2

The start point, corresponding to the interpolation parameter value of 0.

end float2

The end point, corresponding to the interpolation parameter value of 1.

t float2

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

float2

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(float2, float2, float)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

public static float2 lerp(float2 start, float2 end, float t)

Parameters

start float2

The start point, corresponding to the interpolation parameter value of 0.

end float2

The end point, corresponding to the interpolation parameter value of 1.

t float

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

float2

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(float3, float3, float3)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

public static float3 lerp(float3 start, float3 end, float3 t)

Parameters

start float3

The start point, corresponding to the interpolation parameter value of 0.

end float3

The end point, corresponding to the interpolation parameter value of 1.

t float3

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

float3

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(float3, float3, float)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

public static float3 lerp(float3 start, float3 end, float t)

Parameters

start float3

The start point, corresponding to the interpolation parameter value of 0.

end float3

The end point, corresponding to the interpolation parameter value of 1.

t float

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

float3

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(float4, float4, float4)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

public static float4 lerp(float4 start, float4 end, float4 t)

Parameters

start float4

The start point, corresponding to the interpolation parameter value of 0.

end float4

The end point, corresponding to the interpolation parameter value of 1.

t float4

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

float4

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(float4, float4, float)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

public static float4 lerp(float4 start, float4 end, float t)

Parameters

start float4

The start point, corresponding to the interpolation parameter value of 0.

end float4

The end point, corresponding to the interpolation parameter value of 1.

t float

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

float4

The componentwise interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(double, double, double)

Returns the result of linearly interpolating from x to y using the interpolation parameter t.

public static double lerp(double start, double end, double t)

Parameters

start double

The start point, corresponding to the interpolation parameter value of 0.

end double

The end point, corresponding to the interpolation parameter value of 1.

t double

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

double

The interpolation from x to y.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

lerp(float, float, float)

Returns the result of linearly interpolating from start to end using the interpolation parameter t.

public static float lerp(float start, float end, float t)

Parameters

start float

The start point, corresponding to the interpolation parameter value of 0.

end float

The end point, corresponding to the interpolation parameter value of 1.

t float

The interpolation parameter. May be a value outside the interval [0, 1].

Returns

float

The interpolation from start to end.

Remarks

If the interpolation parameter is not in the range [0, 1], then this function extrapolates.

log(double2)

Returns the componentwise natural logarithm of a double2 vector.

public static double2 log(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise natural logarithm of the input.

log(double3)

Returns the componentwise natural logarithm of a double3 vector.

public static double3 log(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise natural logarithm of the input.

log(double4)

Returns the componentwise natural logarithm of a double4 vector.

public static double4 log(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise natural logarithm of the input.

log(float2)

Returns the componentwise natural logarithm of a float2 vector.

public static float2 log(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise natural logarithm of the input.

log(float3)

Returns the componentwise natural logarithm of a float3 vector.

public static float3 log(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise natural logarithm of the input.

log(float4)

Returns the componentwise natural logarithm of a float4 vector.

public static float4 log(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise natural logarithm of the input.

log(quaternion)

Returns the natural logarithm of a quaternion.

public static quaternion log(quaternion q)

Parameters

q quaternion

The quaternion.

Returns

quaternion

The natural logarithm of the input quaternion.

log(double)

Returns the natural logarithm of a double value.

public static double log(double x)

Parameters

x double

Input value.

Returns

double

The natural logarithm of the input.

log(float)

Returns the natural logarithm of a float value.

public static float log(float x)

Parameters

x float

Input value.

Returns

float

The natural logarithm of the input.

log10(double2)

Returns the componentwise base-10 logarithm of a double2 vector.

public static double2 log10(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise base-10 logarithm of the input.

log10(double3)

Returns the componentwise base-10 logarithm of a double3 vector.

public static double3 log10(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise base-10 logarithm of the input.

log10(double4)

Returns the componentwise base-10 logarithm of a double4 vector.

public static double4 log10(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise base-10 logarithm of the input.

log10(float2)

Returns the componentwise base-10 logarithm of a float2 vector.

public static float2 log10(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise base-10 logarithm of the input.

log10(float3)

Returns the componentwise base-10 logarithm of a float3 vector.

public static float3 log10(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise base-10 logarithm of the input.

log10(float4)

Returns the componentwise base-10 logarithm of a float4 vector.

public static float4 log10(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise base-10 logarithm of the input.

log10(double)

Returns the base-10 logarithm of a double value.

public static double log10(double x)

Parameters

x double

Input value.

Returns

double

The base-10 logarithm of the input.

log10(float)

Returns the base-10 logarithm of a float value.

public static float log10(float x)

Parameters

x float

Input value.

Returns

float

The base-10 logarithm of the input.

log2(double2)

Returns the componentwise base-2 logarithm of a double2 vector.

public static double2 log2(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise base-2 logarithm of the input.

log2(double3)

Returns the componentwise base-2 logarithm of a double3 vector.

public static double3 log2(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise base-2 logarithm of the input.

log2(double4)

Returns the componentwise base-2 logarithm of a double4 vector.

public static double4 log2(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise base-2 logarithm of the input.

log2(float2)

Returns the componentwise base-2 logarithm of a float2 vector.

public static float2 log2(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise base-2 logarithm of the input.

log2(float3)

Returns the componentwise base-2 logarithm of a float3 vector.

public static float3 log2(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise base-2 logarithm of the input.

log2(float4)

Returns the componentwise base-2 logarithm of a float4 vector.

public static float4 log2(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise base-2 logarithm of the input.

log2(double)

Returns the base-2 logarithm of a double value.

public static double log2(double x)

Parameters

x double

Input value.

Returns

double

The base-2 logarithm of the input.

log2(float)

Returns the base-2 logarithm of a float value.

public static float log2(float x)

Parameters

x float

Input value.

Returns

float

The base-2 logarithm of the input.

lzcnt(int2)

Returns the componentwise number of leading zeros in the binary representations of an int2 vector.

public static int2 lzcnt(int2 x)

Parameters

x int2

Input value.

Returns

int2

The componentwise number of leading zeros of the input.

lzcnt(int3)

Returns the componentwise number of leading zeros in the binary representations of an int3 vector.

public static int3 lzcnt(int3 x)

Parameters

x int3

Input value.

Returns

int3

The componentwise number of leading zeros of the input.

lzcnt(int4)

Returns the componentwise number of leading zeros in the binary representations of an int4 vector.

public static int4 lzcnt(int4 x)

Parameters

x int4

Input value.

Returns

int4

The componentwise number of leading zeros of the input.

lzcnt(uint2)

Returns the componentwise number of leading zeros in the binary representations of a uint2 vector.

public static int2 lzcnt(uint2 x)

Parameters

x uint2

Input value.

Returns

int2

The componentwise number of leading zeros of the input.

lzcnt(uint3)

Returns the componentwise number of leading zeros in the binary representations of a uint3 vector.

public static int3 lzcnt(uint3 x)

Parameters

x uint3

Input value.

Returns

int3

The componentwise number of leading zeros of the input.

lzcnt(uint4)

Returns the componentwise number of leading zeros in the binary representations of a uint4 vector.

public static int4 lzcnt(uint4 x)

Parameters

x uint4

Input value.

Returns

int4

The componentwise number of leading zeros of the input.

lzcnt(int)

Returns the componentwise number of leading zeros in the binary representations of an int vector.

public static int lzcnt(int x)

Parameters

x int

Input value.

Returns

int

The number of leading zeros of the input.

lzcnt(long)

Returns number of leading zeros in the binary representations of a long value.

public static int lzcnt(long x)

Parameters

x long

Input value.

Returns

int

The number of leading zeros of the input.

lzcnt(uint)

Returns number of leading zeros in the binary representations of a uint value.

public static int lzcnt(uint x)

Parameters

x uint

Input value.

Returns

int

The number of leading zeros of the input.

lzcnt(ulong)

Returns number of leading zeros in the binary representations of a ulong value.

public static int lzcnt(ulong x)

Parameters

x ulong

Input value.

Returns

int

The number of leading zeros of the input.

mad(double2, double2, double2)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 double2 vectors.

public static double2 mad(double2 mulA, double2 mulB, double2 addC)

Parameters

mulA double2

First value to multiply.

mulB double2

Second value to multiply.

addC double2

Third value to add to the product of a and b.

Returns

double2

The componentwise multiply-add of the inputs.

Remarks

When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when this computation is not fused.

mad(double3, double3, double3)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 double3 vectors.

public static double3 mad(double3 mulA, double3 mulB, double3 addC)

Parameters

mulA double3

First value to multiply.

mulB double3

Second value to multiply.

addC double3

Third value to add to the product of a and b.

Returns

double3

The componentwise multiply-add of the inputs.

Remarks

When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when this computation is not fused.

mad(double4, double4, double4)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 double4 vectors.

public static double4 mad(double4 mulA, double4 mulB, double4 addC)

Parameters

mulA double4

First value to multiply.

mulB double4

Second value to multiply.

addC double4

Third value to add to the product of a and b.

Returns

double4

The componentwise multiply-add of the inputs.

Remarks

When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when this computation is not fused.

mad(float2, float2, float2)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 float2 vectors.

public static float2 mad(float2 mulA, float2 mulB, float2 addC)

Parameters

mulA float2

First value to multiply.

mulB float2

Second value to multiply.

addC float2

Third value to add to the product of a and b.

Returns

float2

The componentwise multiply-add of the inputs.

Remarks

When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when this computation is not fused.

mad(float3, float3, float3)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 float3 vectors.

public static float3 mad(float3 mulA, float3 mulB, float3 addC)

Parameters

mulA float3

First value to multiply.

mulB float3

Second value to multiply.

addC float3

Third value to add to the product of a and b.

Returns

float3

The componentwise multiply-add of the inputs.

Remarks

When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when this computation is not fused.

mad(float4, float4, float4)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 float4 vectors.

public static float4 mad(float4 mulA, float4 mulB, float4 addC)

Parameters

mulA float4

First value to multiply.

mulB float4

Second value to multiply.

addC float4

Third value to add to the product of a and b.

Returns

float4

The componentwise multiply-add of the inputs.

Remarks

When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when this computation is not fused.

mad(int2, int2, int2)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 int2 vectors.

public static int2 mad(int2 mulA, int2 mulB, int2 addC)

Parameters

mulA int2

First value to multiply.

mulB int2

Second value to multiply.

addC int2

Third value to add to the product of a and b.

Returns

int2

The componentwise multiply-add of the inputs.

mad(int3, int3, int3)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 int3 vectors.

public static int3 mad(int3 mulA, int3 mulB, int3 addC)

Parameters

mulA int3

First value to multiply.

mulB int3

Second value to multiply.

addC int3

Third value to add to the product of a and b.

Returns

int3

The componentwise multiply-add of the inputs.

mad(int4, int4, int4)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 int4 vectors.

public static int4 mad(int4 mulA, int4 mulB, int4 addC)

Parameters

mulA int4

First value to multiply.

mulB int4

Second value to multiply.

addC int4

Third value to add to the product of a and b.

Returns

int4

The componentwise multiply-add of the inputs.

mad(uint2, uint2, uint2)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 uint2 vectors.

public static uint2 mad(uint2 mulA, uint2 mulB, uint2 addC)

Parameters

mulA uint2

First value to multiply.

mulB uint2

Second value to multiply.

addC uint2

Third value to add to the product of a and b.

Returns

uint2

The componentwise multiply-add of the inputs.

mad(uint3, uint3, uint3)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 uint3 vectors.

public static uint3 mad(uint3 mulA, uint3 mulB, uint3 addC)

Parameters

mulA uint3

First value to multiply.

mulB uint3

Second value to multiply.

addC uint3

Third value to add to the product of a and b.

Returns

uint3

The componentwise multiply-add of the inputs.

mad(uint4, uint4, uint4)

Returns the result of a componentwise multiply-add operation (a * b + c) on 3 uint4 vectors.

public static uint4 mad(uint4 mulA, uint4 mulB, uint4 addC)

Parameters

mulA uint4

First value to multiply.

mulB uint4

Second value to multiply.

addC uint4

Third value to add to the product of a and b.

Returns

uint4

The componentwise multiply-add of the inputs.

mad(double, double, double)

Returns the result of a multiply-add operation (a * b + c) on 3 double values.

public static double mad(double mulA, double mulB, double addC)

Parameters

mulA double

First value to multiply.

mulB double

Second value to multiply.

addC double

Third value to add to the product of a and b.

Returns

double

The multiply-add of the inputs.

Remarks

When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when this computation is not fused.

mad(int, int, int)

Returns the result of a multiply-add operation (a * b + c) on 3 int values.

public static int mad(int mulA, int mulB, int addC)

Parameters

mulA int

First value to multiply.

mulB int

Second value to multiply.

addC int

Third value to add to the product of a and b.

Returns

int

The multiply-add of the inputs.

mad(long, long, long)

Returns the result of a multiply-add operation (a * b + c) on 3 long values.

public static long mad(long mulA, long mulB, long addC)

Parameters

mulA long

First value to multiply.

mulB long

Second value to multiply.

addC long

Third value to add to the product of a and b.

Returns

long

The multiply-add of the inputs.

mad(float, float, float)

Returns the result of a multiply-add operation (a * b + c) on 3 float values.

public static float mad(float mulA, float mulB, float addC)

Parameters

mulA float

First value to multiply.

mulB float

Second value to multiply.

addC float

Third value to add to the product of a and b.

Returns

float

The multiply-add of the inputs.

Remarks

When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when this computation is not fused.

mad(uint, uint, uint)

Returns the result of a multiply-add operation (a * b + c) on 3 uint values.

public static uint mad(uint mulA, uint mulB, uint addC)

Parameters

mulA uint

First value to multiply.

mulB uint

Second value to multiply.

addC uint

Third value to add to the product of a and b.

Returns

uint

The multiply-add of the inputs.

mad(ulong, ulong, ulong)

Returns the result of a multiply-add operation (a * b + c) on 3 ulong values.

public static ulong mad(ulong mulA, ulong mulB, ulong addC)

Parameters

mulA ulong

First value to multiply.

mulB ulong

Second value to multiply.

addC ulong

Third value to add to the product of a and b.

Returns

ulong

The multiply-add of the inputs.

max(double2, double2)

Returns the componentwise maximum of two double2 vectors.

public static double2 max(double2 x, double2 y)

Parameters

x double2

The first input value.

y double2

The second input value.

Returns

double2

The componentwise maximum of the two input values.

max(double3, double3)

Returns the componentwise maximum of two double3 vectors.

public static double3 max(double3 x, double3 y)

Parameters

x double3

The first input value.

y double3

The second input value.

Returns

double3

The componentwise maximum of the two input values.

max(double4, double4)

Returns the componentwise maximum of two double4 vectors.

public static double4 max(double4 x, double4 y)

Parameters

x double4

The first input value.

y double4

The second input value.

Returns

double4

The componentwise maximum of the two input values.

max(float2, float2)

Returns the componentwise maximum of two float2 vectors.

public static float2 max(float2 x, float2 y)

Parameters

x float2

The first input value.

y float2

The second input value.

Returns

float2

The componentwise maximum of the two input values.

max(float3, float3)

Returns the componentwise maximum of two float3 vectors.

public static float3 max(float3 x, float3 y)

Parameters

x float3

The first input value.

y float3

The second input value.

Returns

float3

The componentwise maximum of the two input values.

max(float4, float4)

Returns the componentwise maximum of two float4 vectors.

public static float4 max(float4 x, float4 y)

Parameters

x float4

The first input value.

y float4

The second input value.

Returns

float4

The componentwise maximum of the two input values.

max(int2, int2)

Returns the componentwise maximum of two int2 vectors.

public static int2 max(int2 x, int2 y)

Parameters

x int2

The first input value.

y int2

The second input value.

Returns

int2

The componentwise maximum of the two input values.

max(int3, int3)

Returns the componentwise maximum of two int3 vectors.

public static int3 max(int3 x, int3 y)

Parameters

x int3

The first input value.

y int3

The second input value.

Returns

int3

The componentwise maximum of the two input values.

max(int4, int4)

Returns the componentwise maximum of two int4 vectors.

public static int4 max(int4 x, int4 y)

Parameters

x int4

The first input value.

y int4

The second input value.

Returns

int4

The componentwise maximum of the two input values.

max(uint2, uint2)

Returns the componentwise maximum of two uint2 vectors.

public static uint2 max(uint2 x, uint2 y)

Parameters

x uint2

The first input value.

y uint2

The second input value.

Returns

uint2

The componentwise maximum of the two input values.

max(uint3, uint3)

Returns the componentwise maximum of two uint3 vectors.

public static uint3 max(uint3 x, uint3 y)

Parameters

x uint3

The first input value.

y uint3

The second input value.

Returns

uint3

The componentwise maximum of the two input values.

max(uint4, uint4)

Returns the componentwise maximum of two uint4 vectors.

public static uint4 max(uint4 x, uint4 y)

Parameters

x uint4

The first input value.

y uint4

The second input value.

Returns

uint4

The componentwise maximum of the two input values.

max(double, double)

Returns the maximum of two double values.

public static double max(double x, double y)

Parameters

x double

The first input value.

y double

The second input value.

Returns

double

The maximum of the two input values.

max(int, int)

Returns the maximum of two int values.

public static int max(int x, int y)

Parameters

x int

The first input value.

y int

The second input value.

Returns

int

The maximum of the two input values.

max(long, long)

Returns the maximum of two long values.

public static long max(long x, long y)

Parameters

x long

The first input value.

y long

The second input value.

Returns

long

The maximum of the two input values.

max(float, float)

Returns the maximum of two float values.

public static float max(float x, float y)

Parameters

x float

The first input value.

y float

The second input value.

Returns

float

The maximum of the two input values.

max(uint, uint)

Returns the maximum of two uint values.

public static uint max(uint x, uint y)

Parameters

x uint

The first input value.

y uint

The second input value.

Returns

uint

The maximum of the two input values.

max(ulong, ulong)

Returns the maximum of two ulong values.

public static ulong max(ulong x, ulong y)

Parameters

x ulong

The first input value.

y ulong

The second input value.

Returns

ulong

The maximum of the two input values.

min(double2, double2)

Returns the componentwise minimum of two double2 vectors.

public static double2 min(double2 x, double2 y)

Parameters

x double2

The first input value.

y double2

The second input value.

Returns

double2

The componentwise minimum of the two input values.

min(double3, double3)

Returns the componentwise minimum of two double3 vectors.

public static double3 min(double3 x, double3 y)

Parameters

x double3

The first input value.

y double3

The second input value.

Returns

double3

The componentwise minimum of the two input values.

min(double4, double4)

Returns the componentwise minimum of two double4 vectors.

public static double4 min(double4 x, double4 y)

Parameters

x double4

The first input value.

y double4

The second input value.

Returns

double4

The componentwise minimum of the two input values.

min(float2, float2)

Returns the componentwise minimum of two float2 vectors.

public static float2 min(float2 x, float2 y)

Parameters

x float2

The first input value.

y float2

The second input value.

Returns

float2

The componentwise minimum of the two input values.

min(float3, float3)

Returns the componentwise minimum of two float3 vectors.

public static float3 min(float3 x, float3 y)

Parameters

x float3

The first input value.

y float3

The second input value.

Returns

float3

The componentwise minimum of the two input values.

min(float4, float4)

Returns the componentwise minimum of two float4 vectors.

public static float4 min(float4 x, float4 y)

Parameters

x float4

The first input value.

y float4

The second input value.

Returns

float4

The componentwise minimum of the two input values.

min(int2, int2)

Returns the componentwise minimum of two int2 vectors.

public static int2 min(int2 x, int2 y)

Parameters

x int2

The first input value.

y int2

The second input value.

Returns

int2

The componentwise minimum of the two input values.

min(int3, int3)

Returns the componentwise minimum of two int3 vectors.

public static int3 min(int3 x, int3 y)

Parameters

x int3

The first input value.

y int3

The second input value.

Returns

int3

The componentwise minimum of the two input values.

min(int4, int4)

Returns the componentwise minimum of two int4 vectors.

public static int4 min(int4 x, int4 y)

Parameters

x int4

The first input value.

y int4

The second input value.

Returns

int4

The componentwise minimum of the two input values.

min(uint2, uint2)

Returns the componentwise minimum of two uint2 vectors.

public static uint2 min(uint2 x, uint2 y)

Parameters

x uint2

The first input value.

y uint2

The second input value.

Returns

uint2

The componentwise minimum of the two input values.

min(uint3, uint3)

Returns the componentwise minimum of two uint3 vectors.

public static uint3 min(uint3 x, uint3 y)

Parameters

x uint3

The first input value.

y uint3

The second input value.

Returns

uint3

The componentwise minimum of the two input values.

min(uint4, uint4)

Returns the componentwise minimum of two uint4 vectors.

public static uint4 min(uint4 x, uint4 y)

Parameters

x uint4

The first input value.

y uint4

The second input value.

Returns

uint4

The componentwise minimum of the two input values.

min(double, double)

Returns the minimum of two double values.

public static double min(double x, double y)

Parameters

x double

The first input value.

y double

The second input value.

Returns

double

The minimum of the two input values.

min(int, int)

Returns the minimum of two int values.

public static int min(int x, int y)

Parameters

x int

The first input value.

y int

The second input value.

Returns

int

The minimum of the two input values.

min(long, long)

Returns the minimum of two long values.

public static long min(long x, long y)

Parameters

x long

The first input value.

y long

The second input value.

Returns

long

The minimum of the two input values.

min(float, float)

Returns the minimum of two float values.

public static float min(float x, float y)

Parameters

x float

The first input value.

y float

The second input value.

Returns

float

The minimum of the two input values.

min(uint, uint)

Returns the minimum of two uint values.

public static uint min(uint x, uint y)

Parameters

x uint

The first input value.

y uint

The second input value.

Returns

uint

The minimum of the two input values.

min(ulong, ulong)

Returns the minimum of two ulong values.

public static ulong min(ulong x, ulong y)

Parameters

x ulong

The first input value.

y ulong

The second input value.

Returns

ulong

The minimum of the two input values.

modf(double2, out double2)

Performs a componentwise split of a double2 vector into an integral part i and a fractional part that gets returned. Both parts take the sign of the corresponding input component.

public static double2 modf(double2 x, out double2 i)

Parameters

x double2

Value to split into integral and fractional part.

i double2

Output value containing integral part of x.

Returns

double2

The componentwise fractional part of x.

modf(double3, out double3)

Performs a componentwise split of a double3 vector into an integral part i and a fractional part that gets returned. Both parts take the sign of the corresponding input component.

public static double3 modf(double3 x, out double3 i)

Parameters

x double3

Value to split into integral and fractional part.

i double3

Output value containing integral part of x.

Returns

double3

The componentwise fractional part of x.

modf(double4, out double4)

Performs a componentwise split of a double4 vector into an integral part i and a fractional part that gets returned. Both parts take the sign of the corresponding input component.

public static double4 modf(double4 x, out double4 i)

Parameters

x double4

Value to split into integral and fractional part.

i double4

Output value containing integral part of x.

Returns

double4

The componentwise fractional part of x.

modf(float2, out float2)

Performs a componentwise split of a float2 vector into an integral part i and a fractional part that gets returned. Both parts take the sign of the corresponding input component.

public static float2 modf(float2 x, out float2 i)

Parameters

x float2

Value to split into integral and fractional part.

i float2

Output value containing integral part of x.

Returns

float2

The componentwise fractional part of x.

modf(float3, out float3)

Performs a componentwise split of a float3 vector into an integral part i and a fractional part that gets returned. Both parts take the sign of the corresponding input component.

public static float3 modf(float3 x, out float3 i)

Parameters

x float3

Value to split into integral and fractional part.

i float3

Output value containing integral part of x.

Returns

float3

The componentwise fractional part of x.

modf(float4, out float4)

Performs a componentwise split of a float4 vector into an integral part i and a fractional part that gets returned. Both parts take the sign of the corresponding input component.

public static float4 modf(float4 x, out float4 i)

Parameters

x float4

Value to split into integral and fractional part.

i float4

Output value containing integral part of x.

Returns

float4

The componentwise fractional part of x.

modf(double, out double)

Splits a double value into an integral part i and a fractional part that gets returned. Both parts take the sign of the input.

public static double modf(double x, out double i)

Parameters

x double

Value to split into integral and fractional part.

i double

Output value containing integral part of x.

Returns

double

The fractional part of x.

modf(float, out float)

Splits a float value into an integral part i and a fractional part that gets returned. Both parts take the sign of the input.

public static float modf(float x, out float i)

Parameters

x float

Value to split into integral and fractional part.

i float

Output value containing integral part of x.

Returns

float

The fractional part of x.

mul(double2, double2x2)

public static double2 mul(double2 v, double2x2 m)

Parameters

v double2
m double2x2

Returns

double2

mul(double2, double2x3)

public static double3 mul(double2 v, double2x3 m)

Parameters

v double2
m double2x3

Returns

double3

mul(double2, double2x4)

public static double4 mul(double2 v, double2x4 m)

Parameters

v double2
m double2x4

Returns

double4

mul(double2x2, double2)

public static double2 mul(double2x2 m, double2 v)

Parameters

m double2x2
v double2

Returns

double2

mul(double2x2, double2x2)

public static double2x2 mul(double2x2 lhs, double2x2 rhs)

Parameters

lhs double2x2
rhs double2x2

Returns

double2x2

mul(double2x2, double2x3)

public static double2x3 mul(double2x2 lhs, double2x3 rhs)

Parameters

lhs double2x2
rhs double2x3

Returns

double2x3

mul(double2x2, double2x4)

public static double2x4 mul(double2x2 lhs, double2x4 rhs)

Parameters

lhs double2x2
rhs double2x4

Returns

double2x4

mul(double2x3, double3)

public static double2 mul(double2x3 m, double3 v)

Parameters

m double2x3
v double3

Returns

double2

mul(double2x3, double3x2)

public static double2x2 mul(double2x3 lhs, double3x2 rhs)

Parameters

lhs double2x3
rhs double3x2

Returns

double2x2

mul(double2x3, double3x3)

public static double2x3 mul(double2x3 lhs, double3x3 rhs)

Parameters

lhs double2x3
rhs double3x3

Returns

double2x3

mul(double2x3, double3x4)

public static double2x4 mul(double2x3 lhs, double3x4 rhs)

Parameters

lhs double2x3
rhs double3x4

Returns

double2x4

mul(double2x4, double4)

public static double2 mul(double2x4 m, double4 v)

Parameters

m double2x4
v double4

Returns

double2

mul(double2x4, double4x2)

public static double2x2 mul(double2x4 lhs, double4x2 rhs)

Parameters

lhs double2x4
rhs double4x2

Returns

double2x2

mul(double2x4, double4x3)

public static double2x3 mul(double2x4 lhs, double4x3 rhs)

Parameters

lhs double2x4
rhs double4x3

Returns

double2x3

mul(double2x4, double4x4)

public static double2x4 mul(double2x4 lhs, double4x4 rhs)

Parameters

lhs double2x4
rhs double4x4

Returns

double2x4

mul(double3, double3x2)

public static double2 mul(double3 v, double3x2 m)

Parameters

v double3
m double3x2

Returns

double2

mul(double3, double3x3)

public static double3 mul(double3 v, double3x3 m)

Parameters

v double3
m double3x3

Returns

double3

mul(double3, double3x4)

public static double4 mul(double3 v, double3x4 m)

Parameters

v double3
m double3x4

Returns

double4

mul(double3x2, double2)

public static double3 mul(double3x2 m, double2 v)

Parameters

m double3x2
v double2

Returns

double3

mul(double3x2, double2x2)

public static double3x2 mul(double3x2 lhs, double2x2 rhs)

Parameters

lhs double3x2
rhs double2x2

Returns

double3x2

mul(double3x2, double2x3)

public static double3x3 mul(double3x2 lhs, double2x3 rhs)

Parameters

lhs double3x2
rhs double2x3

Returns

double3x3

mul(double3x2, double2x4)

public static double3x4 mul(double3x2 lhs, double2x4 rhs)

Parameters

lhs double3x2
rhs double2x4

Returns

double3x4

mul(double3x3, double3)

public static double3 mul(double3x3 m, double3 v)

Parameters

m double3x3
v double3

Returns

double3

mul(double3x3, double3x2)

public static double3x2 mul(double3x3 lhs, double3x2 rhs)

Parameters

lhs double3x3
rhs double3x2

Returns

double3x2

mul(double3x3, double3x3)

public static double3x3 mul(double3x3 lhs, double3x3 rhs)

Parameters

lhs double3x3
rhs double3x3

Returns

double3x3

mul(double3x3, double3x4)

public static double3x4 mul(double3x3 lhs, double3x4 rhs)

Parameters

lhs double3x3
rhs double3x4

Returns

double3x4

mul(double3x4, double4)

public static double3 mul(double3x4 m, double4 v)

Parameters

m double3x4
v double4

Returns

double3

mul(double3x4, double4x2)

public static double3x2 mul(double3x4 lhs, double4x2 rhs)

Parameters

lhs double3x4
rhs double4x2

Returns

double3x2

mul(double3x4, double4x3)

public static double3x3 mul(double3x4 lhs, double4x3 rhs)

Parameters

lhs double3x4
rhs double4x3

Returns

double3x3

mul(double3x4, double4x4)

public static double3x4 mul(double3x4 lhs, double4x4 rhs)

Parameters

lhs double3x4
rhs double4x4

Returns

double3x4

mul(double4, double4x2)

public static double2 mul(double4 v, double4x2 m)

Parameters

v double4
m double4x2

Returns

double2

mul(double4, double4x3)

public static double3 mul(double4 v, double4x3 m)

Parameters

v double4
m double4x3

Returns

double3

mul(double4, double4x4)

public static double4 mul(double4 v, double4x4 m)

Parameters

v double4
m double4x4

Returns

double4

mul(double4x2, double2)

public static double4 mul(double4x2 m, double2 v)

Parameters

m double4x2
v double2

Returns

double4

mul(double4x2, double2x2)

public static double4x2 mul(double4x2 lhs, double2x2 rhs)

Parameters

lhs double4x2
rhs double2x2

Returns

double4x2

mul(double4x2, double2x3)

public static double4x3 mul(double4x2 lhs, double2x3 rhs)

Parameters

lhs double4x2
rhs double2x3

Returns

double4x3

mul(double4x2, double2x4)

public static double4x4 mul(double4x2 lhs, double2x4 rhs)

Parameters

lhs double4x2
rhs double2x4

Returns

double4x4

mul(double4x3, double3)

public static double4 mul(double4x3 m, double3 v)

Parameters

m double4x3
v double3

Returns

double4

mul(double4x3, double3x2)

public static double4x2 mul(double4x3 lhs, double3x2 rhs)

Parameters

lhs double4x3
rhs double3x2

Returns

double4x2

mul(double4x3, double3x3)

public static double4x3 mul(double4x3 lhs, double3x3 rhs)

Parameters

lhs double4x3
rhs double3x3

Returns

double4x3

mul(double4x3, double3x4)

public static double4x4 mul(double4x3 lhs, double3x4 rhs)

Parameters

lhs double4x3
rhs double3x4

Returns

double4x4

mul(double4x4, double4)

public static double4 mul(double4x4 m, double4 v)

Parameters

m double4x4
v double4

Returns

double4

mul(double4x4, double4x2)

public static double4x2 mul(double4x4 lhs, double4x2 rhs)

Parameters

lhs double4x4
rhs double4x2

Returns

double4x2

mul(double4x4, double4x3)

public static double4x3 mul(double4x4 lhs, double4x3 rhs)

Parameters

lhs double4x4
rhs double4x3

Returns

double4x3

mul(double4x4, double4x4)

public static double4x4 mul(double4x4 lhs, double4x4 rhs)

Parameters

lhs double4x4
rhs double4x4

Returns

double4x4

mul(float2, float2x2)

public static float2 mul(float2 v, float2x2 m)

Parameters

v float2
m float2x2

Returns

float2

mul(float2, float2x3)

public static float3 mul(float2 v, float2x3 m)

Parameters

v float2
m float2x3

Returns

float3

mul(float2, float2x4)

public static float4 mul(float2 v, float2x4 m)

Parameters

v float2
m float2x4

Returns

float4

mul(float2x2, float2)

public static float2 mul(float2x2 m, float2 v)

Parameters

m float2x2
v float2

Returns

float2

mul(float2x2, float2x2)

public static float2x2 mul(float2x2 lhs, float2x2 rhs)

Parameters

lhs float2x2
rhs float2x2

Returns

float2x2

mul(float2x2, float2x3)

public static float2x3 mul(float2x2 lhs, float2x3 rhs)

Parameters

lhs float2x2
rhs float2x3

Returns

float2x3

mul(float2x2, float2x4)

public static float2x4 mul(float2x2 lhs, float2x4 rhs)

Parameters

lhs float2x2
rhs float2x4

Returns

float2x4

mul(float2x3, float3)

public static float2 mul(float2x3 m, float3 v)

Parameters

m float2x3
v float3

Returns

float2

mul(float2x3, float3x2)

public static float2x2 mul(float2x3 lhs, float3x2 rhs)

Parameters

lhs float2x3
rhs float3x2

Returns

float2x2

mul(float2x3, float3x3)

public static float2x3 mul(float2x3 lhs, float3x3 rhs)

Parameters

lhs float2x3
rhs float3x3

Returns

float2x3

mul(float2x3, float3x4)

public static float2x4 mul(float2x3 lhs, float3x4 rhs)

Parameters

lhs float2x3
rhs float3x4

Returns

float2x4

mul(float2x4, float4)

public static float2 mul(float2x4 m, float4 v)

Parameters

m float2x4
v float4

Returns

float2

mul(float2x4, float4x2)

public static float2x2 mul(float2x4 lhs, float4x2 rhs)

Parameters

lhs float2x4
rhs float4x2

Returns

float2x2

mul(float2x4, float4x3)

public static float2x3 mul(float2x4 lhs, float4x3 rhs)

Parameters

lhs float2x4
rhs float4x3

Returns

float2x3

mul(float2x4, float4x4)

public static float2x4 mul(float2x4 lhs, float4x4 rhs)

Parameters

lhs float2x4
rhs float4x4

Returns

float2x4

mul(float3, float3x2)

public static float2 mul(float3 v, float3x2 m)

Parameters

v float3
m float3x2

Returns

float2

mul(float3, float3x3)

public static float3 mul(float3 v, float3x3 m)

Parameters

v float3
m float3x3

Returns

float3

mul(float3, float3x4)

public static float4 mul(float3 v, float3x4 m)

Parameters

v float3
m float3x4

Returns

float4

mul(float3x2, float2)

public static float3 mul(float3x2 m, float2 v)

Parameters

m float3x2
v float2

Returns

float3

mul(float3x2, float2x2)

public static float3x2 mul(float3x2 lhs, float2x2 rhs)

Parameters

lhs float3x2
rhs float2x2

Returns

float3x2

mul(float3x2, float2x3)

public static float3x3 mul(float3x2 lhs, float2x3 rhs)

Parameters

lhs float3x2
rhs float2x3

Returns

float3x3

mul(float3x2, float2x4)

public static float3x4 mul(float3x2 lhs, float2x4 rhs)

Parameters

lhs float3x2
rhs float2x4

Returns

float3x4

mul(float3x3, float3)

public static float3 mul(float3x3 m, float3 v)

Parameters

m float3x3
v float3

Returns

float3

mul(float3x3, float3x2)

public static float3x2 mul(float3x3 lhs, float3x2 rhs)

Parameters

lhs float3x3
rhs float3x2

Returns

float3x2

mul(float3x3, float3x3)

public static float3x3 mul(float3x3 lhs, float3x3 rhs)

Parameters

lhs float3x3
rhs float3x3

Returns

float3x3

mul(float3x3, float3x4)

public static float3x4 mul(float3x3 lhs, float3x4 rhs)

Parameters

lhs float3x3
rhs float3x4

Returns

float3x4

mul(float3x4, float4)

public static float3 mul(float3x4 m, float4 v)

Parameters

m float3x4
v float4

Returns

float3

mul(float3x4, float4x2)

public static float3x2 mul(float3x4 lhs, float4x2 rhs)

Parameters

lhs float3x4
rhs float4x2

Returns

float3x2

mul(float3x4, float4x3)

public static float3x3 mul(float3x4 lhs, float4x3 rhs)

Parameters

lhs float3x4
rhs float4x3

Returns

float3x3

mul(float3x4, float4x4)

public static float3x4 mul(float3x4 lhs, float4x4 rhs)

Parameters

lhs float3x4
rhs float4x4

Returns

float3x4

mul(float4, float4x2)

public static float2 mul(float4 v, float4x2 m)

Parameters

v float4
m float4x2

Returns

float2

mul(float4, float4x3)

public static float3 mul(float4 v, float4x3 m)

Parameters

v float4
m float4x3

Returns

float3

mul(float4, float4x4)

public static float4 mul(float4 v, float4x4 m)

Parameters

v float4
m float4x4

Returns

float4

mul(float4x2, float2)

public static float4 mul(float4x2 m, float2 v)

Parameters

m float4x2
v float2

Returns

float4

mul(float4x2, float2x2)

public static float4x2 mul(float4x2 lhs, float2x2 rhs)

Parameters

lhs float4x2
rhs float2x2

Returns

float4x2

mul(float4x2, float2x3)

public static float4x3 mul(float4x2 lhs, float2x3 rhs)

Parameters

lhs float4x2
rhs float2x3

Returns

float4x3

mul(float4x2, float2x4)

public static float4x4 mul(float4x2 lhs, float2x4 rhs)

Parameters

lhs float4x2
rhs float2x4

Returns

float4x4

mul(float4x3, float3)

public static float4 mul(float4x3 m, float3 v)

Parameters

m float4x3
v float3

Returns

float4

mul(float4x3, float3x2)

public static float4x2 mul(float4x3 lhs, float3x2 rhs)

Parameters

lhs float4x3
rhs float3x2

Returns

float4x2

mul(float4x3, float3x3)

public static float4x3 mul(float4x3 lhs, float3x3 rhs)

Parameters

lhs float4x3
rhs float3x3

Returns

float4x3

mul(float4x3, float3x4)

public static float4x4 mul(float4x3 lhs, float3x4 rhs)

Parameters

lhs float4x3
rhs float3x4

Returns

float4x4

mul(float4x4, float4)

public static float4 mul(float4x4 m, float4 v)

Parameters

m float4x4
v float4

Returns

float4

mul(float4x4, float4x2)

public static float4x2 mul(float4x4 lhs, float4x2 rhs)

Parameters

lhs float4x4
rhs float4x2

Returns

float4x2

mul(float4x4, float4x3)

public static float4x3 mul(float4x4 lhs, float4x3 rhs)

Parameters

lhs float4x4
rhs float4x3

Returns

float4x3

mul(float4x4, float4x4)

public static float4x4 mul(float4x4 lhs, float4x4 rhs)

Parameters

lhs float4x4
rhs float4x4

Returns

float4x4

mul(int2, int2x2)

public static int2 mul(int2 v, int2x2 m)

Parameters

v int2
m int2x2

Returns

int2

mul(int2, int2x3)

public static int3 mul(int2 v, int2x3 m)

Parameters

v int2
m int2x3

Returns

int3

mul(int2, int2x4)

public static int4 mul(int2 v, int2x4 m)

Parameters

v int2
m int2x4

Returns

int4

mul(int2x2, int2)

public static int2 mul(int2x2 m, int2 v)

Parameters

m int2x2
v int2

Returns

int2

mul(int2x2, int2x2)

public static int2x2 mul(int2x2 lhs, int2x2 rhs)

Parameters

lhs int2x2
rhs int2x2

Returns

int2x2

mul(int2x2, int2x3)

public static int2x3 mul(int2x2 lhs, int2x3 rhs)

Parameters

lhs int2x2
rhs int2x3

Returns

int2x3

mul(int2x2, int2x4)

public static int2x4 mul(int2x2 lhs, int2x4 rhs)

Parameters

lhs int2x2
rhs int2x4

Returns

int2x4

mul(int2x3, int3)

public static int2 mul(int2x3 m, int3 v)

Parameters

m int2x3
v int3

Returns

int2

mul(int2x3, int3x2)

public static int2x2 mul(int2x3 lhs, int3x2 rhs)

Parameters

lhs int2x3
rhs int3x2

Returns

int2x2

mul(int2x3, int3x3)

public static int2x3 mul(int2x3 lhs, int3x3 rhs)

Parameters

lhs int2x3
rhs int3x3

Returns

int2x3

mul(int2x3, int3x4)

public static int2x4 mul(int2x3 lhs, int3x4 rhs)

Parameters

lhs int2x3
rhs int3x4

Returns

int2x4

mul(int2x4, int4)

public static int2 mul(int2x4 m, int4 v)

Parameters

m int2x4
v int4

Returns

int2

mul(int2x4, int4x2)

public static int2x2 mul(int2x4 lhs, int4x2 rhs)

Parameters

lhs int2x4
rhs int4x2

Returns

int2x2

mul(int2x4, int4x3)

public static int2x3 mul(int2x4 lhs, int4x3 rhs)

Parameters

lhs int2x4
rhs int4x3

Returns

int2x3

mul(int2x4, int4x4)

public static int2x4 mul(int2x4 lhs, int4x4 rhs)

Parameters

lhs int2x4
rhs int4x4

Returns

int2x4

mul(int3, int3x2)

public static int2 mul(int3 v, int3x2 m)

Parameters

v int3
m int3x2

Returns

int2

mul(int3, int3x3)

public static int3 mul(int3 v, int3x3 m)

Parameters

v int3
m int3x3

Returns

int3

mul(int3, int3x4)

public static int4 mul(int3 v, int3x4 m)

Parameters

v int3
m int3x4

Returns

int4

mul(int3x2, int2)

public static int3 mul(int3x2 m, int2 v)

Parameters

m int3x2
v int2

Returns

int3

mul(int3x2, int2x2)

public static int3x2 mul(int3x2 lhs, int2x2 rhs)

Parameters

lhs int3x2
rhs int2x2

Returns

int3x2

mul(int3x2, int2x3)

public static int3x3 mul(int3x2 lhs, int2x3 rhs)

Parameters

lhs int3x2
rhs int2x3

Returns

int3x3

mul(int3x2, int2x4)

public static int3x4 mul(int3x2 lhs, int2x4 rhs)

Parameters

lhs int3x2
rhs int2x4

Returns

int3x4

mul(int3x3, int3)

public static int3 mul(int3x3 m, int3 v)

Parameters

m int3x3
v int3

Returns

int3

mul(int3x3, int3x2)

public static int3x2 mul(int3x3 lhs, int3x2 rhs)

Parameters

lhs int3x3
rhs int3x2

Returns

int3x2

mul(int3x3, int3x3)

public static int3x3 mul(int3x3 lhs, int3x3 rhs)

Parameters

lhs int3x3
rhs int3x3

Returns

int3x3

mul(int3x3, int3x4)

public static int3x4 mul(int3x3 lhs, int3x4 rhs)

Parameters

lhs int3x3
rhs int3x4

Returns

int3x4

mul(int3x4, int4)

public static int3 mul(int3x4 m, int4 v)

Parameters

m int3x4
v int4

Returns

int3

mul(int3x4, int4x2)

public static int3x2 mul(int3x4 lhs, int4x2 rhs)

Parameters

lhs int3x4
rhs int4x2

Returns

int3x2

mul(int3x4, int4x3)

public static int3x3 mul(int3x4 lhs, int4x3 rhs)

Parameters

lhs int3x4
rhs int4x3

Returns

int3x3

mul(int3x4, int4x4)

public static int3x4 mul(int3x4 lhs, int4x4 rhs)

Parameters

lhs int3x4
rhs int4x4

Returns

int3x4

mul(int4, int4x2)

public static int2 mul(int4 v, int4x2 m)

Parameters

v int4
m int4x2

Returns

int2

mul(int4, int4x3)

public static int3 mul(int4 v, int4x3 m)

Parameters

v int4
m int4x3

Returns

int3

mul(int4, int4x4)

public static int4 mul(int4 v, int4x4 m)

Parameters

v int4
m int4x4

Returns

int4

mul(int4x2, int2)

public static int4 mul(int4x2 m, int2 v)

Parameters

m int4x2
v int2

Returns

int4

mul(int4x2, int2x2)

public static int4x2 mul(int4x2 lhs, int2x2 rhs)

Parameters

lhs int4x2
rhs int2x2

Returns

int4x2

mul(int4x2, int2x3)

public static int4x3 mul(int4x2 lhs, int2x3 rhs)

Parameters

lhs int4x2
rhs int2x3

Returns

int4x3

mul(int4x2, int2x4)

public static int4x4 mul(int4x2 lhs, int2x4 rhs)

Parameters

lhs int4x2
rhs int2x4

Returns

int4x4

mul(int4x3, int3)

public static int4 mul(int4x3 m, int3 v)

Parameters

m int4x3
v int3

Returns

int4

mul(int4x3, int3x2)

public static int4x2 mul(int4x3 lhs, int3x2 rhs)

Parameters

lhs int4x3
rhs int3x2

Returns

int4x2

mul(int4x3, int3x3)

public static int4x3 mul(int4x3 lhs, int3x3 rhs)

Parameters

lhs int4x3
rhs int3x3

Returns

int4x3

mul(int4x3, int3x4)

public static int4x4 mul(int4x3 lhs, int3x4 rhs)

Parameters

lhs int4x3
rhs int3x4

Returns

int4x4

mul(int4x4, int4)

public static int4 mul(int4x4 m, int4 v)

Parameters

m int4x4
v int4

Returns

int4

mul(int4x4, int4x2)

public static int4x2 mul(int4x4 lhs, int4x2 rhs)

Parameters

lhs int4x4
rhs int4x2

Returns

int4x2

mul(int4x4, int4x3)

public static int4x3 mul(int4x4 lhs, int4x3 rhs)

Parameters

lhs int4x4
rhs int4x3

Returns

int4x3

mul(int4x4, int4x4)

public static int4x4 mul(int4x4 lhs, int4x4 rhs)

Parameters

lhs int4x4
rhs int4x4

Returns

int4x4

mul(quaternion, float3)

Returns the result of transforming a vector by a quaternion.

public static float3 mul(quaternion q, float3 v)

Parameters

q quaternion

The quaternion transformation.

v float3

The vector to transform.

Returns

float3

The transformation of vector v by quaternion q.

mul(quaternion, quaternion)

Returns the result of transforming the quaternion b by the quaternion a.

public static quaternion mul(quaternion a, quaternion b)

Parameters

a quaternion

The quaternion on the left.

b quaternion

The quaternion on the right.

Returns

quaternion

The result of transforming quaternion b by the quaternion a.

mul(uint2, uint2x2)

public static uint2 mul(uint2 v, uint2x2 m)

Parameters

v uint2
m uint2x2

Returns

uint2

mul(uint2, uint2x3)

public static uint3 mul(uint2 v, uint2x3 m)

Parameters

v uint2
m uint2x3

Returns

uint3

mul(uint2, uint2x4)

public static uint4 mul(uint2 v, uint2x4 m)

Parameters

v uint2
m uint2x4

Returns

uint4

mul(uint2x2, uint2)

public static uint2 mul(uint2x2 m, uint2 v)

Parameters

m uint2x2
v uint2

Returns

uint2

mul(uint2x2, uint2x2)

public static uint2x2 mul(uint2x2 lhs, uint2x2 rhs)

Parameters

lhs uint2x2
rhs uint2x2

Returns

uint2x2

mul(uint2x2, uint2x3)

public static uint2x3 mul(uint2x2 lhs, uint2x3 rhs)

Parameters

lhs uint2x2
rhs uint2x3

Returns

uint2x3

mul(uint2x2, uint2x4)

public static uint2x4 mul(uint2x2 lhs, uint2x4 rhs)

Parameters

lhs uint2x2
rhs uint2x4

Returns

uint2x4

mul(uint2x3, uint3)

public static uint2 mul(uint2x3 m, uint3 v)

Parameters

m uint2x3
v uint3

Returns

uint2

mul(uint2x3, uint3x2)

public static uint2x2 mul(uint2x3 lhs, uint3x2 rhs)

Parameters

lhs uint2x3
rhs uint3x2

Returns

uint2x2

mul(uint2x3, uint3x3)

public static uint2x3 mul(uint2x3 lhs, uint3x3 rhs)

Parameters

lhs uint2x3
rhs uint3x3

Returns

uint2x3

mul(uint2x3, uint3x4)

public static uint2x4 mul(uint2x3 lhs, uint3x4 rhs)

Parameters

lhs uint2x3
rhs uint3x4

Returns

uint2x4

mul(uint2x4, uint4)

public static uint2 mul(uint2x4 m, uint4 v)

Parameters

m uint2x4
v uint4

Returns

uint2

mul(uint2x4, uint4x2)

public static uint2x2 mul(uint2x4 lhs, uint4x2 rhs)

Parameters

lhs uint2x4
rhs uint4x2

Returns

uint2x2

mul(uint2x4, uint4x3)

public static uint2x3 mul(uint2x4 lhs, uint4x3 rhs)

Parameters

lhs uint2x4
rhs uint4x3

Returns

uint2x3

mul(uint2x4, uint4x4)

public static uint2x4 mul(uint2x4 lhs, uint4x4 rhs)

Parameters

lhs uint2x4
rhs uint4x4

Returns

uint2x4

mul(uint3, uint3x2)

public static uint2 mul(uint3 v, uint3x2 m)

Parameters

v uint3
m uint3x2

Returns

uint2

mul(uint3, uint3x3)

public static uint3 mul(uint3 v, uint3x3 m)

Parameters

v uint3
m uint3x3

Returns

uint3

mul(uint3, uint3x4)

public static uint4 mul(uint3 v, uint3x4 m)

Parameters

v uint3
m uint3x4

Returns

uint4

mul(uint3x2, uint2)

public static uint3 mul(uint3x2 m, uint2 v)

Parameters

m uint3x2
v uint2

Returns

uint3

mul(uint3x2, uint2x2)

public static uint3x2 mul(uint3x2 lhs, uint2x2 rhs)

Parameters

lhs uint3x2
rhs uint2x2

Returns

uint3x2

mul(uint3x2, uint2x3)

public static uint3x3 mul(uint3x2 lhs, uint2x3 rhs)

Parameters

lhs uint3x2
rhs uint2x3

Returns

uint3x3

mul(uint3x2, uint2x4)

public static uint3x4 mul(uint3x2 lhs, uint2x4 rhs)

Parameters

lhs uint3x2
rhs uint2x4

Returns

uint3x4

mul(uint3x3, uint3)

public static uint3 mul(uint3x3 m, uint3 v)

Parameters

m uint3x3
v uint3

Returns

uint3

mul(uint3x3, uint3x2)

public static uint3x2 mul(uint3x3 lhs, uint3x2 rhs)

Parameters

lhs uint3x3
rhs uint3x2

Returns

uint3x2

mul(uint3x3, uint3x3)

public static uint3x3 mul(uint3x3 lhs, uint3x3 rhs)

Parameters

lhs uint3x3
rhs uint3x3

Returns

uint3x3

mul(uint3x3, uint3x4)

public static uint3x4 mul(uint3x3 lhs, uint3x4 rhs)

Parameters

lhs uint3x3
rhs uint3x4

Returns

uint3x4

mul(uint3x4, uint4)

public static uint3 mul(uint3x4 m, uint4 v)

Parameters

m uint3x4
v uint4

Returns

uint3

mul(uint3x4, uint4x2)

public static uint3x2 mul(uint3x4 lhs, uint4x2 rhs)

Parameters

lhs uint3x4
rhs uint4x2

Returns

uint3x2

mul(uint3x4, uint4x3)

public static uint3x3 mul(uint3x4 lhs, uint4x3 rhs)

Parameters

lhs uint3x4
rhs uint4x3

Returns

uint3x3

mul(uint3x4, uint4x4)

public static uint3x4 mul(uint3x4 lhs, uint4x4 rhs)

Parameters

lhs uint3x4
rhs uint4x4

Returns

uint3x4

mul(uint4, uint4x2)

public static uint2 mul(uint4 v, uint4x2 m)

Parameters

v uint4
m uint4x2

Returns

uint2

mul(uint4, uint4x3)

public static uint3 mul(uint4 v, uint4x3 m)

Parameters

v uint4
m uint4x3

Returns

uint3

mul(uint4, uint4x4)

public static uint4 mul(uint4 v, uint4x4 m)

Parameters

v uint4
m uint4x4

Returns

uint4

mul(uint4x2, uint2)

public static uint4 mul(uint4x2 m, uint2 v)

Parameters

m uint4x2
v uint2

Returns

uint4

mul(uint4x2, uint2x2)

public static uint4x2 mul(uint4x2 lhs, uint2x2 rhs)

Parameters

lhs uint4x2
rhs uint2x2

Returns

uint4x2

mul(uint4x2, uint2x3)

public static uint4x3 mul(uint4x2 lhs, uint2x3 rhs)

Parameters

lhs uint4x2
rhs uint2x3

Returns

uint4x3

mul(uint4x2, uint2x4)

public static uint4x4 mul(uint4x2 lhs, uint2x4 rhs)

Parameters

lhs uint4x2
rhs uint2x4

Returns

uint4x4

mul(uint4x3, uint3)

public static uint4 mul(uint4x3 m, uint3 v)

Parameters

m uint4x3
v uint3

Returns

uint4

mul(uint4x3, uint3x2)

public static uint4x2 mul(uint4x3 lhs, uint3x2 rhs)

Parameters

lhs uint4x3
rhs uint3x2

Returns

uint4x2

mul(uint4x3, uint3x3)

public static uint4x3 mul(uint4x3 lhs, uint3x3 rhs)

Parameters

lhs uint4x3
rhs uint3x3

Returns

uint4x3

mul(uint4x3, uint3x4)

public static uint4x4 mul(uint4x3 lhs, uint3x4 rhs)

Parameters

lhs uint4x3
rhs uint3x4

Returns

uint4x4

mul(uint4x4, uint4)

public static uint4 mul(uint4x4 m, uint4 v)

Parameters

m uint4x4
v uint4

Returns

uint4

mul(uint4x4, uint4x2)

public static uint4x2 mul(uint4x4 lhs, uint4x2 rhs)

Parameters

lhs uint4x4
rhs uint4x2

Returns

uint4x2

mul(uint4x4, uint4x3)

public static uint4x3 mul(uint4x4 lhs, uint4x3 rhs)

Parameters

lhs uint4x4
rhs uint4x3

Returns

uint4x3

mul(uint4x4, uint4x4)

public static uint4x4 mul(uint4x4 lhs, uint4x4 rhs)

Parameters

lhs uint4x4
rhs uint4x4

Returns

uint4x4

mulScale(float3x3, float3)

Matrix columns multiplied by scale components m.c0.x * s.x | m.c1.x * s.y | m.c2.x * s.z m.c0.y * s.x | m.c1.y * s.y | m.c2.y * s.z m.c0.z * s.x | m.c1.z * s.y | m.c2.z * s.z

public static float3x3 mulScale(float3x3 m, float3 s)

Parameters

m float3x3

Matrix to scale.

s float3

Scaling coefficients for each column.

Returns

float3x3

The scaled matrix.

nlerp(quaternion, quaternion, float)

Returns the result of a normalized linear interpolation between two quaternions q1 and a2 using an interpolation parameter t.

public static quaternion nlerp(quaternion q1, quaternion q2, float t)

Parameters

q1 quaternion

The first quaternion.

q2 quaternion

The second quaternion.

t float

The interpolation parameter.

Returns

quaternion

The normalized linear interpolation of two quaternions.

Remarks

Prefer to use this over slerp() when you know the distance between q1 and q2 is small. This can be much higher performance due to avoiding trigonometric function evaluations that occur in slerp().

normalize(double2)

Returns a normalized version of the double2 vector x by scaling it by 1 / length(x).

public static double2 normalize(double2 x)

Parameters

x double2

Vector to normalize.

Returns

double2

The normalized vector.

normalize(double3)

Returns a normalized version of the double3 vector x by scaling it by 1 / length(x).

public static double3 normalize(double3 x)

Parameters

x double3

Vector to normalize.

Returns

double3

The normalized vector.

normalize(double4)

Returns a normalized version of the double4 vector x by scaling it by 1 / length(x).

public static double4 normalize(double4 x)

Parameters

x double4

Vector to normalize.

Returns

double4

The normalized vector.

normalize(float2)

Returns a normalized version of the float2 vector x by scaling it by 1 / length(x).

public static float2 normalize(float2 x)

Parameters

x float2

Vector to normalize.

Returns

float2

The normalized vector.

normalize(float3)

Returns a normalized version of the float3 vector x by scaling it by 1 / length(x).

public static float3 normalize(float3 x)

Parameters

x float3

Vector to normalize.

Returns

float3

The normalized vector.

normalize(float4)

Returns a normalized version of the float4 vector x by scaling it by 1 / length(x).

public static float4 normalize(float4 x)

Parameters

x float4

Vector to normalize.

Returns

float4

The normalized vector.

normalize(quaternion)

Returns a normalized version of a quaternion q by scaling it by 1 / length(q).

public static quaternion normalize(quaternion q)

Parameters

q quaternion

The quaternion to normalize.

Returns

quaternion

The normalized quaternion.

normalizesafe(double2, double2)

Returns a safe normalized version of the double4 vector x by scaling it by 1 / length(x). Returns the given default value when 1 / length(x) does not produce a finite number.

public static double2 normalizesafe(double2 x, double2 defaultvalue = default)

Parameters

x double2

Vector to normalize.

defaultvalue double2

Vector to return if normalized vector is not finite.

Returns

double2

The normalized vector or the default value if the normalized vector is not finite.

normalizesafe(double3, double3)

Returns a safe normalized version of the double4 vector x by scaling it by 1 / length(x). Returns the given default value when 1 / length(x) does not produce a finite number.

public static double3 normalizesafe(double3 x, double3 defaultvalue = default)

Parameters

x double3

Vector to normalize.

defaultvalue double3

Vector to return if normalized vector is not finite.

Returns

double3

The normalized vector or the default value if the normalized vector is not finite.

normalizesafe(double4, double4)

Returns a safe normalized version of the double4 vector x by scaling it by 1 / length(x). Returns the given default value when 1 / length(x) does not produce a finite number.

public static double4 normalizesafe(double4 x, double4 defaultvalue = default)

Parameters

x double4

Vector to normalize.

defaultvalue double4

Vector to return if normalized vector is not finite.

Returns

double4

The normalized vector or the default value if the normalized vector is not finite.

normalizesafe(float2, float2)

Returns a safe normalized version of the float2 vector x by scaling it by 1 / length(x). Returns the given default value when 1 / length(x) does not produce a finite number.

public static float2 normalizesafe(float2 x, float2 defaultvalue = default)

Parameters

x float2

Vector to normalize.

defaultvalue float2

Vector to return if normalized vector is not finite.

Returns

float2

The normalized vector or the default value if the normalized vector is not finite.

normalizesafe(float3, float3)

Returns a safe normalized version of the float3 vector x by scaling it by 1 / length(x). Returns the given default value when 1 / length(x) does not produce a finite number.

public static float3 normalizesafe(float3 x, float3 defaultvalue = default)

Parameters

x float3

Vector to normalize.

defaultvalue float3

Vector to return if normalized vector is not finite.

Returns

float3

The normalized vector or the default value if the normalized vector is not finite.

normalizesafe(float4, float4)

Returns a safe normalized version of the float4 vector x by scaling it by 1 / length(x). Returns the given default value when 1 / length(x) does not produce a finite number.

public static float4 normalizesafe(float4 x, float4 defaultvalue = default)

Parameters

x float4

Vector to normalize.

defaultvalue float4

Vector to return if normalized vector is not finite.

Returns

float4

The normalized vector or the default value if the normalized vector is not finite.

normalizesafe(quaternion)

Returns a safe normalized version of the q by scaling it by 1 / length(q). Returns the identity when 1 / length(q) does not produce a finite number.

public static quaternion normalizesafe(quaternion q)

Parameters

q quaternion

The quaternion to normalize.

Returns

quaternion

The normalized quaternion or the identity quaternion.

normalizesafe(quaternion, quaternion)

Returns a safe normalized version of the q by scaling it by 1 / length(q). Returns the given default value when 1 / length(q) does not produce a finite number.

public static quaternion normalizesafe(quaternion q, quaternion defaultvalue)

Parameters

q quaternion

The quaternion to normalize.

defaultvalue quaternion

The default value.

Returns

quaternion

The normalized quaternion or the default value.

orthonormal_basis(double3, out double3, out double3)

Generate an orthonormal basis given a single unit length normal vector.

public static void orthonormal_basis(double3 normal, out double3 basis1, out double3 basis2)

Parameters

normal double3

Unit length normal vector.

basis1 double3

Output unit length vector, orthogonal to normal vector.

basis2 double3

Output unit length vector, orthogonal to normal vector and basis1.

Remarks

This implementation is from "Building an Orthonormal Basis, Revisited" https://graphics.pixar.com/library/OrthonormalB/paper.pdf

orthonormal_basis(float3, out float3, out float3)

Generate an orthonormal basis given a single unit length normal vector.

public static void orthonormal_basis(float3 normal, out float3 basis1, out float3 basis2)

Parameters

normal float3

Unit length normal vector.

basis1 float3

Output unit length vector, orthogonal to normal vector.

basis2 float3

Output unit length vector, orthogonal to normal vector and basis1.

Remarks

This implementation is from "Building an Orthonormal Basis, Revisited" https://graphics.pixar.com/library/OrthonormalB/paper.pdf

pow(double2, double2)

Returns the componentwise result of raising x to the power y.

public static double2 pow(double2 x, double2 y)

Parameters

x double2

The exponent base.

y double2

The exponent power.

Returns

double2

The componentwise result of raising x to the power y.

pow(double3, double3)

Returns the componentwise result of raising x to the power y.

public static double3 pow(double3 x, double3 y)

Parameters

x double3

The exponent base.

y double3

The exponent power.

Returns

double3

The componentwise result of raising x to the power y.

pow(double4, double4)

Returns the componentwise result of raising x to the power y.

public static double4 pow(double4 x, double4 y)

Parameters

x double4

The exponent base.

y double4

The exponent power.

Returns

double4

The componentwise result of raising x to the power y.

pow(float2, float2)

Returns the componentwise result of raising x to the power y.

public static float2 pow(float2 x, float2 y)

Parameters

x float2

The exponent base.

y float2

The exponent power.

Returns

float2

The componentwise result of raising x to the power y.

pow(float3, float3)

Returns the componentwise result of raising x to the power y.

public static float3 pow(float3 x, float3 y)

Parameters

x float3

The exponent base.

y float3

The exponent power.

Returns

float3

The componentwise result of raising x to the power y.

pow(float4, float4)

Returns the componentwise result of raising x to the power y.

public static float4 pow(float4 x, float4 y)

Parameters

x float4

The exponent base.

y float4

The exponent power.

Returns

float4

The componentwise result of raising x to the power y.

pow(double, double)

Returns x raised to the power y.

public static double pow(double x, double y)

Parameters

x double

The exponent base.

y double

The exponent power.

Returns

double

The result of raising x to the power y.

pow(float, float)

Returns x raised to the power y.

public static float pow(float x, float y)

Parameters

x float

The exponent base.

y float

The exponent power.

Returns

float

The result of raising x to the power y.

project(double2, double2)

Compute vector projection of a onto b.

public static double2 project(double2 a, double2 ontoB)

Parameters

a double2

Vector to project.

ontoB double2

Non-zero vector to project onto.

Returns

double2

Vector projection of a onto b.

Remarks

Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call projectsafe(double2, double2, double2) which will use a given default value if the result is not finite.

project(double3, double3)

Compute vector projection of a onto b.

public static double3 project(double3 a, double3 ontoB)

Parameters

a double3

Vector to project.

ontoB double3

Non-zero vector to project onto.

Returns

double3

Vector projection of a onto b.

Remarks

Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call projectsafe(double3, double3, double3) which will use a given default value if the result is not finite.

project(double4, double4)

Compute vector projection of a onto b.

public static double4 project(double4 a, double4 ontoB)

Parameters

a double4

Vector to project.

ontoB double4

Non-zero vector to project onto.

Returns

double4

Vector projection of a onto b.

Remarks

Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call projectsafe(double4, double4, double4) which will use a given default value if the result is not finite.

project(float2, float2)

Compute vector projection of a onto b.

public static float2 project(float2 a, float2 ontoB)

Parameters

a float2

Vector to project.

ontoB float2

Non-zero vector to project onto.

Returns

float2

Vector projection of a onto b.

Remarks

Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call projectsafe(float2, float2, float2) which will use a given default value if the result is not finite.

project(float3, float3)

Compute vector projection of a onto b.

public static float3 project(float3 a, float3 ontoB)

Parameters

a float3

Vector to project.

ontoB float3

Non-zero vector to project onto.

Returns

float3

Vector projection of a onto b.

Remarks

Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call projectsafe(float3, float3, float3) which will use a given default value if the result is not finite.

project(float4, float4)

Compute vector projection of a onto b.

public static float4 project(float4 a, float4 ontoB)

Parameters

a float4

Vector to project.

ontoB float4

Non-zero vector to project onto.

Returns

float4

Vector projection of a onto b.

Remarks

Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call projectsafe(float4, float4, float4) which will use a given default value if the result is not finite.

projectsafe(double2, double2, double2)

Compute vector projection of a onto b. If result is not finite, then return the default value instead.

public static double2 projectsafe(double2 a, double2 ontoB, double2 defaultValue = default)

Parameters

a double2

Vector to project.

ontoB double2

Non-zero vector to project onto.

defaultValue double2

Default value to return if projection is not finite.

Returns

double2

Vector projection of a onto b or the default value.

Remarks

This function performs extra checks to see if the result of projecting a onto b is finite. If you know that your inputs will generate a finite result or you don't care if the result is finite, then you can call project(double2, double2) instead which is faster than this function.

projectsafe(double3, double3, double3)

Compute vector projection of a onto b. If result is not finite, then return the default value instead.

public static double3 projectsafe(double3 a, double3 ontoB, double3 defaultValue = default)

Parameters

a double3

Vector to project.

ontoB double3

Non-zero vector to project onto.

defaultValue double3

Default value to return if projection is not finite.

Returns

double3

Vector projection of a onto b or the default value.

Remarks

This function performs extra checks to see if the result of projecting a onto b is finite. If you know that your inputs will generate a finite result or you don't care if the result is finite, then you can call project(double3, double3) instead which is faster than this function.

projectsafe(double4, double4, double4)

Compute vector projection of a onto b. If result is not finite, then return the default value instead.

public static double4 projectsafe(double4 a, double4 ontoB, double4 defaultValue = default)

Parameters

a double4

Vector to project.

ontoB double4

Non-zero vector to project onto.

defaultValue double4

Default value to return if projection is not finite.

Returns

double4

Vector projection of a onto b or the default value.

Remarks

This function performs extra checks to see if the result of projecting a onto b is finite. If you know that your inputs will generate a finite result or you don't care if the result is finite, then you can call project(double4, double4) instead which is faster than this function.

projectsafe(float2, float2, float2)

Compute vector projection of a onto b. If result is not finite, then return the default value instead.

public static float2 projectsafe(float2 a, float2 ontoB, float2 defaultValue = default)

Parameters

a float2

Vector to project.

ontoB float2

Non-zero vector to project onto.

defaultValue float2

Default value to return if projection is not finite.

Returns

float2

Vector projection of a onto b or the default value.

Remarks

This function performs extra checks to see if the result of projecting a onto b is finite. If you know that your inputs will generate a finite result or you don't care if the result is finite, then you can call project(float2, float2) instead which is faster than this function.

projectsafe(float3, float3, float3)

Compute vector projection of a onto b. If result is not finite, then return the default value instead.

public static float3 projectsafe(float3 a, float3 ontoB, float3 defaultValue = default)

Parameters

a float3

Vector to project.

ontoB float3

Non-zero vector to project onto.

defaultValue float3

Default value to return if projection is not finite.

Returns

float3

Vector projection of a onto b or the default value.

Remarks

This function performs extra checks to see if the result of projecting a onto b is finite. If you know that your inputs will generate a finite result or you don't care if the result is finite, then you can call project(float3, float3) instead which is faster than this function.

projectsafe(float4, float4, float4)

Compute vector projection of a onto b. If result is not finite, then return the default value instead.

public static float4 projectsafe(float4 a, float4 ontoB, float4 defaultValue = default)

Parameters

a float4

Vector to project.

ontoB float4

Non-zero vector to project onto.

defaultValue float4

Default value to return if projection is not finite.

Returns

float4

Vector projection of a onto b or the default value.

Remarks

This function performs extra checks to see if the result of projecting a onto b is finite. If you know that your inputs will generate a finite result or you don't care if the result is finite, then you can call project(float4, float4) instead which is faster than this function.

quaternion(float4)

Returns a quaternion constructed from a float4 vector.

public static quaternion quaternion(float4 value)

Parameters

value float4

The float4 containing the components of the quaternion.

Returns

quaternion

The quaternion constructed from a float4.

quaternion(float, float, float, float)

Returns a quaternion constructed from four float values.

public static quaternion quaternion(float x, float y, float z, float w)

Parameters

x float

The x component of the quaternion.

y float

The y component of the quaternion.

z float

The z component of the quaternion.

w float

The w component of the quaternion.

Returns

quaternion

The quaternion constructed from individual components.

radians(double2)

Returns the result of a componentwise conversion of a float2 vector from degrees to radians.

public static double2 radians(double2 x)

Parameters

x double2

Vector containing angles in degrees.

Returns

double2

Vector containing angles converted to radians.

radians(double3)

Returns the result of a componentwise conversion of a float3 vector from degrees to radians.

public static double3 radians(double3 x)

Parameters

x double3

Vector containing angles in degrees.

Returns

double3

Vector containing angles converted to radians.

radians(double4)

Returns the result of a componentwise conversion of a float4 vector from degrees to radians.

public static double4 radians(double4 x)

Parameters

x double4

Vector containing angles in degrees.

Returns

double4

Vector containing angles converted to radians.

radians(float2)

Returns the result of a componentwise conversion of a float2 vector from degrees to radians.

public static float2 radians(float2 x)

Parameters

x float2

Vector containing angles in degrees.

Returns

float2

Vector containing angles converted to radians.

radians(float3)

Returns the result of a componentwise conversion of a float3 vector from degrees to radians.

public static float3 radians(float3 x)

Parameters

x float3

Vector containing angles in degrees.

Returns

float3

Vector containing angles converted to radians.

radians(float4)

Returns the result of a componentwise conversion of a float4 vector from degrees to radians.

public static float4 radians(float4 x)

Parameters

x float4

Vector containing angles in degrees.

Returns

float4

Vector containing angles converted to radians.

radians(double)

Returns the result of converting a float value from degrees to radians.

public static double radians(double x)

Parameters

x double

Angle in degrees.

Returns

double

Angle converted to radians.

radians(float)

Returns the result of converting a float value from degrees to radians.

public static float radians(float x)

Parameters

x float

Angle in degrees.

Returns

float

Angle converted to radians.

rcp(double2)

Returns the componentwise reciprocal a double2 vector.

public static double2 rcp(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise reciprocal of the input.

rcp(double3)

Returns the componentwise reciprocal a double3 vector.

public static double3 rcp(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise reciprocal of the input.

rcp(double4)

Returns the componentwise reciprocal a double4 vector.

public static double4 rcp(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise reciprocal of the input.

rcp(float2)

Returns the componentwise reciprocal a float2 vector.

public static float2 rcp(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise reciprocal of the input.

rcp(float3)

Returns the componentwise reciprocal a float3 vector.

public static float3 rcp(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise reciprocal of the input.

rcp(float4)

Returns the componentwise reciprocal a float4 vector.

public static float4 rcp(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise reciprocal of the input.

rcp(double)

Returns the reciprocal a double value.

public static double rcp(double x)

Parameters

x double

Input value.

Returns

double

The reciprocal of the input.

rcp(float)

Returns the reciprocal a float value.

public static float rcp(float x)

Parameters

x float

Input value.

Returns

float

The reciprocal of the input.

reflect(double2, double2)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 * dot(i, n) * n.

public static double2 reflect(double2 i, double2 n)

Parameters

i double2

Incident vector.

n double2

Normal vector.

Returns

double2

Reflection vector.

reflect(double3, double3)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 * dot(i, n) * n.

public static double3 reflect(double3 i, double3 n)

Parameters

i double3

Incident vector.

n double3

Normal vector.

Returns

double3

Reflection vector.

reflect(double4, double4)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 * dot(i, n) * n.

public static double4 reflect(double4 i, double4 n)

Parameters

i double4

Incident vector.

n double4

Normal vector.

Returns

double4

Reflection vector.

reflect(float2, float2)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f * dot(i, n) * n.

public static float2 reflect(float2 i, float2 n)

Parameters

i float2

Incident vector.

n float2

Normal vector.

Returns

float2

Reflection vector.

reflect(float3, float3)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f * dot(i, n) * n.

public static float3 reflect(float3 i, float3 n)

Parameters

i float3

Incident vector.

n float3

Normal vector.

Returns

float3

Reflection vector.

reflect(float4, float4)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f * dot(i, n) * n.

public static float4 reflect(float4 i, float4 n)

Parameters

i float4

Incident vector.

n float4

Normal vector.

Returns

float4

Reflection vector.

refract(double2, double2, double)

Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

public static double2 refract(double2 i, double2 n, double indexOfRefraction)

Parameters

i double2

Incident vector.

n double2

Normal vector.

indexOfRefraction double

Index of refraction.

Returns

double2

Refraction vector.

refract(double3, double3, double)

Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

public static double3 refract(double3 i, double3 n, double indexOfRefraction)

Parameters

i double3

Incident vector.

n double3

Normal vector.

indexOfRefraction double

Index of refraction.

Returns

double3

Refraction vector.

refract(double4, double4, double)

Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

public static double4 refract(double4 i, double4 n, double indexOfRefraction)

Parameters

i double4

Incident vector.

n double4

Normal vector.

indexOfRefraction double

Index of refraction.

Returns

double4

Refraction vector.

refract(float2, float2, float)

Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

public static float2 refract(float2 i, float2 n, float indexOfRefraction)

Parameters

i float2

Incident vector.

n float2

Normal vector.

indexOfRefraction float

Index of refraction.

Returns

float2

Refraction vector.

refract(float3, float3, float)

Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

public static float3 refract(float3 i, float3 n, float indexOfRefraction)

Parameters

i float3

Incident vector.

n float3

Normal vector.

indexOfRefraction float

Index of refraction.

Returns

float3

Refraction vector.

refract(float4, float4, float)

Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

public static float4 refract(float4 i, float4 n, float indexOfRefraction)

Parameters

i float4

Incident vector.

n float4

Normal vector.

indexOfRefraction float

Index of refraction.

Returns

float4

Refraction vector.

remap(double2, double2, double2, double2, double2)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

public static double2 remap(double2 srcStart, double2 srcEnd, double2 dstStart, double2 dstEnd, double2 x)

Parameters

srcStart double2

The start point of the source range [srcStart, srcEnd].

srcEnd double2

The end point of the source range [srcStart, srcEnd].

dstStart double2

The start point of the destination range [dstStart, dstEnd].

dstEnd double2

The end point of the destination range [dstStart, dstEnd].

x double2

The value to remap from the source to destination range.

Returns

double2

The componentwise remap of input x from the source range to the destination range.

remap(double3, double3, double3, double3, double3)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

public static double3 remap(double3 srcStart, double3 srcEnd, double3 dstStart, double3 dstEnd, double3 x)

Parameters

srcStart double3

The start point of the source range [srcStart, srcEnd].

srcEnd double3

The end point of the source range [srcStart, srcEnd].

dstStart double3

The start point of the destination range [dstStart, dstEnd].

dstEnd double3

The end point of the destination range [dstStart, dstEnd].

x double3

The value to remap from the source to destination range.

Returns

double3

The componentwise remap of input x from the source range to the destination range.

remap(double4, double4, double4, double4, double4)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

public static double4 remap(double4 srcStart, double4 srcEnd, double4 dstStart, double4 dstEnd, double4 x)

Parameters

srcStart double4

The start point of the source range [srcStart, srcEnd].

srcEnd double4

The end point of the source range [srcStart, srcEnd].

dstStart double4

The start point of the destination range [dstStart, dstEnd].

dstEnd double4

The end point of the destination range [dstStart, dstEnd].

x double4

The value to remap from the source to destination range.

Returns

double4

The componentwise remap of input x from the source range to the destination range.

remap(float2, float2, float2, float2, float2)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

public static float2 remap(float2 srcStart, float2 srcEnd, float2 dstStart, float2 dstEnd, float2 x)

Parameters

srcStart float2

The start point of the source range [srcStart, srcEnd].

srcEnd float2

The end point of the source range [srcStart, srcEnd].

dstStart float2

The start point of the destination range [dstStart, dstEnd].

dstEnd float2

The end point of the destination range [dstStart, dstEnd].

x float2

The value to remap from the source to destination range.

Returns

float2

The componentwise remap of input x from the source range to the destination range.

remap(float3, float3, float3, float3, float3)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

public static float3 remap(float3 srcStart, float3 srcEnd, float3 dstStart, float3 dstEnd, float3 x)

Parameters

srcStart float3

The start point of the source range [srcStart, srcEnd].

srcEnd float3

The end point of the source range [srcStart, srcEnd].

dstStart float3

The start point of the destination range [dstStart, dstEnd].

dstEnd float3

The end point of the destination range [dstStart, dstEnd].

x float3

The value to remap from the source to destination range.

Returns

float3

The componentwise remap of input x from the source range to the destination range.

remap(float4, float4, float4, float4, float4)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

public static float4 remap(float4 srcStart, float4 srcEnd, float4 dstStart, float4 dstEnd, float4 x)

Parameters

srcStart float4

The start point of the source range [srcStart, srcEnd].

srcEnd float4

The end point of the source range [srcStart, srcEnd].

dstStart float4

The start point of the destination range [dstStart, dstEnd].

dstEnd float4

The end point of the destination range [dstStart, dstEnd].

x float4

The value to remap from the source to destination range.

Returns

float4

The componentwise remap of input x from the source range to the destination range.

remap(double, double, double, double, double)

Returns the result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

public static double remap(double srcStart, double srcEnd, double dstStart, double dstEnd, double x)

Parameters

srcStart double

The start point of the source range [srcStart, srcEnd].

srcEnd double

The end point of the source range [srcStart, srcEnd].

dstStart double

The start point of the destination range [dstStart, dstEnd].

dstEnd double

The end point of the destination range [dstStart, dstEnd].

x double

The value to remap from the source to destination range.

Returns

double

The remap of input x from the source range to the destination range.

remap(float, float, float, float, float)

Returns the result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

public static float remap(float srcStart, float srcEnd, float dstStart, float dstEnd, float x)

Parameters

srcStart float

The start point of the source range [srcStart, srcEnd].

srcEnd float

The end point of the source range [srcStart, srcEnd].

dstStart float

The start point of the destination range [dstStart, dstEnd].

dstEnd float

The end point of the destination range [dstStart, dstEnd].

x float

The value to remap from the source to destination range.

Returns

float

The remap of input x from the source range to the destination range.

reversebits(int2)

Returns the result of performing a componentwise reversal of the bit pattern of an int2 vector.

public static int2 reversebits(int2 x)

Parameters

x int2

Value to reverse.

Returns

int2

Value with componentwise reversed bits.

reversebits(int3)

Returns the result of performing a componentwise reversal of the bit pattern of an int3 vector.

public static int3 reversebits(int3 x)

Parameters

x int3

Value to reverse.

Returns

int3

Value with componentwise reversed bits.

reversebits(int4)

Returns the result of performing a componentwise reversal of the bit pattern of an int4 vector.

public static int4 reversebits(int4 x)

Parameters

x int4

Value to reverse.

Returns

int4

Value with componentwise reversed bits.

reversebits(uint2)

Returns the result of performing a componentwise reversal of the bit pattern of an uint2 vector.

public static uint2 reversebits(uint2 x)

Parameters

x uint2

Value to reverse.

Returns

uint2

Value with componentwise reversed bits.

reversebits(uint3)

Returns the result of performing a componentwise reversal of the bit pattern of an uint3 vector.

public static uint3 reversebits(uint3 x)

Parameters

x uint3

Value to reverse.

Returns

uint3

Value with componentwise reversed bits.

reversebits(uint4)

Returns the result of performing a componentwise reversal of the bit pattern of an uint4 vector.

public static uint4 reversebits(uint4 x)

Parameters

x uint4

Value to reverse.

Returns

uint4

Value with componentwise reversed bits.

reversebits(int)

Returns the result of performing a reversal of the bit pattern of an int value.

public static int reversebits(int x)

Parameters

x int

Value to reverse.

Returns

int

Value with reversed bits.

reversebits(long)

Returns the result of performing a reversal of the bit pattern of a long value.

public static long reversebits(long x)

Parameters

x long

Value to reverse.

Returns

long

Value with reversed bits.

reversebits(uint)

Returns the result of performing a reversal of the bit pattern of a uint value.

public static uint reversebits(uint x)

Parameters

x uint

Value to reverse.

Returns

uint

Value with reversed bits.

reversebits(ulong)

Returns the result of performing a reversal of the bit pattern of a ulong value.

public static ulong reversebits(ulong x)

Parameters

x ulong

Value to reverse.

Returns

ulong

Value with reversed bits.

right()

Unity's right axis (1, 0, 0).

public static float3 right()

Returns

float3

The right axis.

Remarks

rol(int2, int)

Returns the componentwise result of rotating the bits of an int2 left by bits n.

public static int2 rol(int2 x, int n)

Parameters

x int2

Value to rotate.

n int

Number of bits to rotate.

Returns

int2

The componentwise rotated value.

rol(int3, int)

Returns the componentwise result of rotating the bits of an int3 left by bits n.

public static int3 rol(int3 x, int n)

Parameters

x int3

Value to rotate.

n int

Number of bits to rotate.

Returns

int3

The componentwise rotated value.

rol(int4, int)

Returns the componentwise result of rotating the bits of an int4 left by bits n.

public static int4 rol(int4 x, int n)

Parameters

x int4

Value to rotate.

n int

Number of bits to rotate.

Returns

int4

The componentwise rotated value.

rol(uint2, int)

Returns the componentwise result of rotating the bits of a uint2 left by bits n.

public static uint2 rol(uint2 x, int n)

Parameters

x uint2

Value to rotate.

n int

Number of bits to rotate.

Returns

uint2

The componentwise rotated value.

rol(uint3, int)

Returns the componentwise result of rotating the bits of a uint3 left by bits n.

public static uint3 rol(uint3 x, int n)

Parameters

x uint3

Value to rotate.

n int

Number of bits to rotate.

Returns

uint3

The componentwise rotated value.

rol(uint4, int)

Returns the componentwise result of rotating the bits of a uint4 left by bits n.

public static uint4 rol(uint4 x, int n)

Parameters

x uint4

Value to rotate.

n int

Number of bits to rotate.

Returns

uint4

The componentwise rotated value.

rol(int, int)

Returns the result of rotating the bits of an int left by bits n.

public static int rol(int x, int n)

Parameters

x int

Value to rotate.

n int

Number of bits to rotate.

Returns

int

The rotated value.

rol(long, int)

Returns the result of rotating the bits of a long left by bits n.

public static long rol(long x, int n)

Parameters

x long

Value to rotate.

n int

Number of bits to rotate.

Returns

long

The rotated value.

rol(uint, int)

Returns the result of rotating the bits of a uint left by bits n.

public static uint rol(uint x, int n)

Parameters

x uint

Value to rotate.

n int

Number of bits to rotate.

Returns

uint

The rotated value.

rol(ulong, int)

Returns the result of rotating the bits of a ulong left by bits n.

public static ulong rol(ulong x, int n)

Parameters

x ulong

Value to rotate.

n int

Number of bits to rotate.

Returns

ulong

The rotated value.

ror(int2, int)

Returns the componentwise result of rotating the bits of an int2 right by bits n.

public static int2 ror(int2 x, int n)

Parameters

x int2

Value to rotate.

n int

Number of bits to rotate.

Returns

int2

The componentwise rotated value.

ror(int3, int)

Returns the componentwise result of rotating the bits of an int3 right by bits n.

public static int3 ror(int3 x, int n)

Parameters

x int3

Value to rotate.

n int

Number of bits to rotate.

Returns

int3

The componentwise rotated value.

ror(int4, int)

Returns the componentwise result of rotating the bits of an int4 right by bits n.

public static int4 ror(int4 x, int n)

Parameters

x int4

Value to rotate.

n int

Number of bits to rotate.

Returns

int4

The componentwise rotated value.

ror(uint2, int)

Returns the componentwise result of rotating the bits of a uint2 right by bits n.

public static uint2 ror(uint2 x, int n)

Parameters

x uint2

Value to rotate.

n int

Number of bits to rotate.

Returns

uint2

The componentwise rotated value.

ror(uint3, int)

Returns the componentwise result of rotating the bits of a uint3 right by bits n.

public static uint3 ror(uint3 x, int n)

Parameters

x uint3

Value to rotate.

n int

Number of bits to rotate.

Returns

uint3

The componentwise rotated value.

ror(uint4, int)

Returns the componentwise result of rotating the bits of a uint4 right by bits n.

public static uint4 ror(uint4 x, int n)

Parameters

x uint4

Value to rotate.

n int

Number of bits to rotate.

Returns

uint4

The componentwise rotated value.

ror(int, int)

Returns the result of rotating the bits of an int right by bits n.

public static int ror(int x, int n)

Parameters

x int

Value to rotate.

n int

Number of bits to rotate.

Returns

int

The rotated value.

ror(long, int)

Returns the result of rotating the bits of a long right by bits n.

public static long ror(long x, int n)

Parameters

x long

Value to rotate.

n int

Number of bits to rotate.

Returns

long

The rotated value.

ror(uint, int)

Returns the result of rotating the bits of a uint right by bits n.

public static uint ror(uint x, int n)

Parameters

x uint

Value to rotate.

n int

Number of bits to rotate.

Returns

uint

The rotated value.

ror(ulong, int)

Returns the result of rotating the bits of a ulong right by bits n.

public static ulong ror(ulong x, int n)

Parameters

x ulong

Value to rotate.

n int

Number of bits to rotate.

Returns

ulong

The rotated value.

rotate(quaternion, float3)

Returns the result of rotating a vector by a unit quaternion.

public static float3 rotate(quaternion q, float3 v)

Parameters

q quaternion

The quaternion rotation.

v float3

The vector to rotate.

Returns

float3

The rotation of vector v by quaternion q.

rotation(float3x3)

Extracts the rotation from a matrix.

public static quaternion rotation(float3x3 m)

Parameters

m float3x3

Matrix to extract rotation from

Returns

quaternion

Extracted rotation

Remarks

This method supports any type of rotation matrix: if the matrix has a non uniform scale you should use this method.

round(double2)

Returns the result of rounding each component of a double2 vector value to the nearest integral value.

public static double2 round(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise round to nearest integral value of the input.

round(double3)

Returns the result of rounding each component of a double3 vector value to the nearest integral value.

public static double3 round(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise round to nearest integral value of the input.

round(double4)

Returns the result of rounding each component of a double4 vector value to the nearest integral value.

public static double4 round(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise round to nearest integral value of the input.

round(float2)

Returns the result of rounding each component of a float2 vector value to the nearest integral value.

public static float2 round(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise round to nearest integral value of the input.

round(float3)

Returns the result of rounding each component of a float3 vector value to the nearest integral value.

public static float3 round(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise round to nearest integral value of the input.

round(float4)

Returns the result of rounding each component of a float4 vector value to the nearest integral value.

public static float4 round(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise round to nearest integral value of the input.

round(double)

Returns the result of rounding a double value to the nearest integral value.

public static double round(double x)

Parameters

x double

Input value.

Returns

double

The round to nearest integral value of the input.

round(float)

Returns the result of rounding a float value to the nearest integral value.

public static float round(float x)

Parameters

x float

Input value.

Returns

float

The round to nearest integral value of the input.

rsqrt(double2)

Returns the componentwise reciprocal square root of a double2 vector.

public static double2 rsqrt(double2 x)

Parameters

x double2

Value to use when computing reciprocal square root.

Returns

double2

The componentwise reciprocal square root.

rsqrt(double3)

Returns the componentwise reciprocal square root of a double3 vector.

public static double3 rsqrt(double3 x)

Parameters

x double3

Value to use when computing reciprocal square root.

Returns

double3

The componentwise reciprocal square root.

rsqrt(double4)

Returns the componentwise reciprocal square root of a double4 vector.

public static double4 rsqrt(double4 x)

Parameters

x double4

Value to use when computing reciprocal square root.

Returns

double4

The componentwise reciprocal square root.

rsqrt(float2)

Returns the componentwise reciprocal square root of a float2 vector.

public static float2 rsqrt(float2 x)

Parameters

x float2

Value to use when computing reciprocal square root.

Returns

float2

The componentwise reciprocal square root.

rsqrt(float3)

Returns the componentwise reciprocal square root of a float3 vector.

public static float3 rsqrt(float3 x)

Parameters

x float3

Value to use when computing reciprocal square root.

Returns

float3

The componentwise reciprocal square root.

rsqrt(float4)

Returns the componentwise reciprocal square root of a float4 vector

public static float4 rsqrt(float4 x)

Parameters

x float4

Value to use when computing reciprocal square root.

Returns

float4

The componentwise reciprocal square root.

rsqrt(double)

Returns the reciprocal square root of a double value.

public static double rsqrt(double x)

Parameters

x double

Value to use when computing reciprocal square root.

Returns

double

The reciprocal square root.

rsqrt(float)

Returns the reciprocal square root of a float value.

public static float rsqrt(float x)

Parameters

x float

Value to use when computing reciprocal square root.

Returns

float

The reciprocal square root.

saturate(double2)

Returns the result of a componentwise clamping of the double2 vector x into the interval [0, 1].

public static double2 saturate(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise clamping of the input into the interval [0, 1].

saturate(double3)

Returns the result of a componentwise clamping of the double3 vector x into the interval [0, 1].

public static double3 saturate(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise clamping of the input into the interval [0, 1].

saturate(double4)

Returns the result of a componentwise clamping of the double4 vector x into the interval [0, 1].

public static double4 saturate(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise clamping of the input into the interval [0, 1].

saturate(float2)

Returns the result of a componentwise clamping of the float2 vector x into the interval [0, 1].

public static float2 saturate(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise clamping of the input into the interval [0, 1].

saturate(float3)

Returns the result of a componentwise clamping of the float3 vector x into the interval [0, 1].

public static float3 saturate(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise clamping of the input into the interval [0, 1].

saturate(float4)

Returns the result of a componentwise clamping of the float4 vector x into the interval [0, 1].

public static float4 saturate(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise clamping of the input into the interval [0, 1].

saturate(double)

Returns the result of clamping the double value x into the interval [0, 1].

public static double saturate(double x)

Parameters

x double

Input value.

Returns

double

The clamping of the input into the interval [0, 1].

saturate(float)

Returns the result of clamping the float value x into the interval [0, 1].

public static float saturate(float x)

Parameters

x float

Input value.

Returns

float

The clamping of the input into the interval [0, 1].

scaleMul(float3, float3x3)

Matrix rows multiplied by scale components m.c0.x * s.x | m.c1.x * s.x | m.c2.x * s.x m.c0.y * s.y | m.c1.y * s.y | m.c2.y * s.y m.c0.z * s.z | m.c1.z * s.z | m.c2.z * s.z

public static float3x3 scaleMul(float3 s, float3x3 m)

Parameters

s float3

Scaling coefficients for each row.

m float3x3

Matrix to scale.

Returns

float3x3

The scaled matrix.

select(double2, double2, bool2)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static double2 select(double2 trueValue, double2 falseValue, bool2 test)

Parameters

trueValue double2

Values to use if test is true.

falseValue double2

Values to use if test is false.

test bool2

Selection mask to choose between falseValue and trueValue.

Returns

double2

The componentwise selection between falseValue and trueValue according to selection mask test.

select(double2, double2, bool)

Returns trueValue if test is true, falseValue otherwise.

public static double2 select(double2 trueValue, double2 falseValue, bool test)

Parameters

trueValue double2

Value to use if test is true.

falseValue double2

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

double2

The selection between falseValue and trueValue according to bool test.

select(double3, double3, bool3)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static double3 select(double3 trueValue, double3 falseValue, bool3 test)

Parameters

trueValue double3

Values to use if test is true.

falseValue double3

Values to use if test is false.

test bool3

Selection mask to choose between falseValue and trueValue.

Returns

double3

The componentwise selection between falseValue and trueValue according to selection mask test.

select(double3, double3, bool)

Returns trueValue if test is true, falseValue otherwise.

public static double3 select(double3 trueValue, double3 falseValue, bool test)

Parameters

trueValue double3

Value to use if test is true.

falseValue double3

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

double3

The selection between falseValue and trueValue according to bool test.

select(double4, double4, bool4)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static double4 select(double4 trueValue, double4 falseValue, bool4 test)

Parameters

trueValue double4

Values to use if test is true.

falseValue double4

Values to use if test is false.

test bool4

Selection mask to choose between falseValue and trueValue.

Returns

double4

The componentwise selection between falseValue and trueValue according to selection mask test.

select(double4, double4, bool)

Returns trueValue if test is true, falseValue otherwise.

public static double4 select(double4 trueValue, double4 falseValue, bool test)

Parameters

trueValue double4

Value to use if test is true.

falseValue double4

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

double4

The selection between falseValue and trueValue according to bool test.

select(float2, float2, bool2)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static float2 select(float2 trueValue, float2 falseValue, bool2 test)

Parameters

trueValue float2

Values to use if test is true.

falseValue float2

Values to use if test is false.

test bool2

Selection mask to choose between falseValue and trueValue.

Returns

float2

The componentwise selection between falseValue and trueValue according to selection mask test.

select(float2, float2, bool)

Returns trueValue if test is true, falseValue otherwise.

public static float2 select(float2 trueValue, float2 falseValue, bool test)

Parameters

trueValue float2

Value to use if test is true.

falseValue float2

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

float2

The selection between falseValue and trueValue according to bool test.

select(float3, float3, bool3)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static float3 select(float3 trueValue, float3 falseValue, bool3 test)

Parameters

trueValue float3

Values to use if test is true.

falseValue float3

Values to use if test is false.

test bool3

Selection mask to choose between falseValue and trueValue.

Returns

float3

The componentwise selection between falseValue and trueValue according to selection mask test.

select(float3, float3, bool)

Returns trueValue if test is true, falseValue otherwise.

public static float3 select(float3 trueValue, float3 falseValue, bool test)

Parameters

trueValue float3

Value to use if test is true.

falseValue float3

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

float3

The selection between falseValue and trueValue according to bool test.

select(float4, float4, bool4)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static float4 select(float4 trueValue, float4 falseValue, bool4 test)

Parameters

trueValue float4

Values to use if test is true.

falseValue float4

Values to use if test is false.

test bool4

Selection mask to choose between falseValue and trueValue.

Returns

float4

The componentwise selection between falseValue and trueValue according to selection mask test.

select(float4, float4, bool)

Returns trueValue if test is true, falseValue otherwise.

public static float4 select(float4 trueValue, float4 falseValue, bool test)

Parameters

trueValue float4

Value to use if test is true.

falseValue float4

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

float4

The selection between falseValue and trueValue according to bool test.

select(int2, int2, bool2)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static int2 select(int2 trueValue, int2 falseValue, bool2 test)

Parameters

trueValue int2

Values to use if test is true.

falseValue int2

Values to use if test is false.

test bool2

Selection mask to choose between falseValue and trueValue.

Returns

int2

The componentwise selection between falseValue and trueValue according to selection mask test.

select(int2, int2, bool)

Returns trueValue if test is true, falseValue otherwise.

public static int2 select(int2 trueValue, int2 falseValue, bool test)

Parameters

trueValue int2

Value to use if test is true.

falseValue int2

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

int2

The selection between falseValue and trueValue according to bool test.

select(int3, int3, bool3)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static int3 select(int3 trueValue, int3 falseValue, bool3 test)

Parameters

trueValue int3

Values to use if test is true.

falseValue int3

Values to use if test is false.

test bool3

Selection mask to choose between falseValue and trueValue.

Returns

int3

The componentwise selection between falseValue and trueValue according to selection mask test.

select(int3, int3, bool)

Returns trueValue if test is true, falseValue otherwise.

public static int3 select(int3 trueValue, int3 falseValue, bool test)

Parameters

trueValue int3

Value to use if test is true.

falseValue int3

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

int3

The selection between falseValue and trueValue according to bool test.

select(int4, int4, bool4)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static int4 select(int4 trueValue, int4 falseValue, bool4 test)

Parameters

trueValue int4

Values to use if test is true.

falseValue int4

Values to use if test is false.

test bool4

Selection mask to choose between falseValue and trueValue.

Returns

int4

The componentwise selection between falseValue and trueValue according to selection mask test.

select(int4, int4, bool)

Returns trueValue if test is true, falseValue otherwise.

public static int4 select(int4 trueValue, int4 falseValue, bool test)

Parameters

trueValue int4

Value to use if test is true.

falseValue int4

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

int4

The selection between falseValue and trueValue according to bool test.

select(uint2, uint2, bool2)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static uint2 select(uint2 trueValue, uint2 falseValue, bool2 test)

Parameters

trueValue uint2

Values to use if test is true.

falseValue uint2

Values to use if test is false.

test bool2

Selection mask to choose between falseValue and trueValue.

Returns

uint2

The componentwise selection between falseValue and trueValue according to selection mask test.

select(uint2, uint2, bool)

Returns trueValue if test is true, falseValue otherwise.

public static uint2 select(uint2 trueValue, uint2 falseValue, bool test)

Parameters

trueValue uint2

Value to use if test is true.

falseValue uint2

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

uint2

The selection between falseValue and trueValue according to bool test.

select(uint3, uint3, bool3)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static uint3 select(uint3 trueValue, uint3 falseValue, bool3 test)

Parameters

trueValue uint3

Values to use if test is true.

falseValue uint3

Values to use if test is false.

test bool3

Selection mask to choose between falseValue and trueValue.

Returns

uint3

The componentwise selection between falseValue and trueValue according to selection mask test.

select(uint3, uint3, bool)

Returns trueValue if test is true, falseValue otherwise.

public static uint3 select(uint3 trueValue, uint3 falseValue, bool test)

Parameters

trueValue uint3

Value to use if test is true.

falseValue uint3

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

uint3

The selection between falseValue and trueValue according to bool test.

select(uint4, uint4, bool4)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

public static uint4 select(uint4 trueValue, uint4 falseValue, bool4 test)

Parameters

trueValue uint4

Values to use if test is true.

falseValue uint4

Values to use if test is false.

test bool4

Selection mask to choose between falseValue and trueValue.

Returns

uint4

The componentwise selection between falseValue and trueValue according to selection mask test.

select(uint4, uint4, bool)

Returns trueValue if test is true, falseValue otherwise.

public static uint4 select(uint4 trueValue, uint4 falseValue, bool test)

Parameters

trueValue uint4

Value to use if test is true.

falseValue uint4

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

uint4

The selection between falseValue and trueValue according to bool test.

select(double, double, bool)

Returns trueValue if test is true, falseValue otherwise.

public static double select(double trueValue, double falseValue, bool test)

Parameters

trueValue double

Value to use if test is true.

falseValue double

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

double

The selection between falseValue and trueValue according to bool test.

select(int, int, bool)

Returns trueValue if test is true, falseValue otherwise.

public static int select(int trueValue, int falseValue, bool test)

Parameters

trueValue int

Value to use if test is true.

falseValue int

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

int

The selection between falseValue and trueValue according to bool test.

select(long, long, bool)

Returns trueValue if test is true, falseValue otherwise.

public static long select(long trueValue, long falseValue, bool test)

Parameters

trueValue long

Value to use if test is true.

falseValue long

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

long

The selection between falseValue and trueValue according to bool test.

select(float, float, bool)

Returns trueValue if test is true, falseValue otherwise.

public static float select(float trueValue, float falseValue, bool test)

Parameters

trueValue float

Value to use if test is true.

falseValue float

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

float

The selection between falseValue and trueValue according to bool test.

select(uint, uint, bool)

Returns trueValue if test is true, falseValue otherwise.

public static uint select(uint trueValue, uint falseValue, bool test)

Parameters

trueValue uint

Value to use if test is true.

falseValue uint

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

uint

The selection between falseValue and trueValue according to bool test.

select(ulong, ulong, bool)

Returns trueValue if test is true, falseValue otherwise.

public static ulong select(ulong trueValue, ulong falseValue, bool test)

Parameters

trueValue ulong

Value to use if test is true.

falseValue ulong

Value to use if test is false.

test bool

Bool value to choose between falseValue and trueValue.

Returns

ulong

The selection between falseValue and trueValue according to bool test.

shuffle(bool2, bool2, ShuffleComponent)

public static uint shuffle(bool2 left, bool2 right, math.ShuffleComponent x)

Parameters

left bool2
right bool2
x math.ShuffleComponent

Returns

uint

shuffle(bool2, bool2, ShuffleComponent, ShuffleComponent)

public static bool2 shuffle(bool2 left, bool2 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left bool2
right bool2
x math.ShuffleComponent
y math.ShuffleComponent

Returns

bool2

shuffle(bool3, bool3, ShuffleComponent)

public static uint shuffle(bool3 left, bool3 right, math.ShuffleComponent x)

Parameters

left bool3
right bool3
x math.ShuffleComponent

Returns

uint

shuffle(bool3, bool3, ShuffleComponent, ShuffleComponent)

public static bool2 shuffle(bool3 left, bool3 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left bool3
right bool3
x math.ShuffleComponent
y math.ShuffleComponent

Returns

bool2

shuffle(bool3, bool3, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static bool3 shuffle(bool3 left, bool3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left bool3
right bool3
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

bool3

shuffle(bool4, bool4, ShuffleComponent)

public static uint shuffle(bool4 left, bool4 right, math.ShuffleComponent x)

Parameters

left bool4
right bool4
x math.ShuffleComponent

Returns

uint

shuffle(bool4, bool4, ShuffleComponent, ShuffleComponent)

public static bool2 shuffle(bool4 left, bool4 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left bool4
right bool4
x math.ShuffleComponent
y math.ShuffleComponent

Returns

bool2

shuffle(bool4, bool4, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static bool3 shuffle(bool4 left, bool4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left bool4
right bool4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

bool3

shuffle(bool4, bool4, ShuffleComponent, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static bool4 shuffle(bool4 left, bool4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z, math.ShuffleComponent w)

Parameters

left bool4
right bool4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent
w math.ShuffleComponent

Returns

bool4

shuffle(double2, double2, ShuffleComponent)

public static double shuffle(double2 left, double2 right, math.ShuffleComponent x)

Parameters

left double2
right double2
x math.ShuffleComponent

Returns

double

shuffle(double2, double2, ShuffleComponent, ShuffleComponent)

public static double2 shuffle(double2 left, double2 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left double2
right double2
x math.ShuffleComponent
y math.ShuffleComponent

Returns

double2

shuffle(double3, double3, ShuffleComponent)

public static double shuffle(double3 left, double3 right, math.ShuffleComponent x)

Parameters

left double3
right double3
x math.ShuffleComponent

Returns

double

shuffle(double3, double3, ShuffleComponent, ShuffleComponent)

public static double2 shuffle(double3 left, double3 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left double3
right double3
x math.ShuffleComponent
y math.ShuffleComponent

Returns

double2

shuffle(double3, double3, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static double3 shuffle(double3 left, double3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left double3
right double3
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

double3

shuffle(double4, double4, ShuffleComponent)

public static double shuffle(double4 left, double4 right, math.ShuffleComponent x)

Parameters

left double4
right double4
x math.ShuffleComponent

Returns

double

shuffle(double4, double4, ShuffleComponent, ShuffleComponent)

public static double2 shuffle(double4 left, double4 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left double4
right double4
x math.ShuffleComponent
y math.ShuffleComponent

Returns

double2

shuffle(double4, double4, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static double3 shuffle(double4 left, double4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left double4
right double4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

double3

shuffle(double4, double4, ShuffleComponent, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static double4 shuffle(double4 left, double4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z, math.ShuffleComponent w)

Parameters

left double4
right double4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent
w math.ShuffleComponent

Returns

double4

shuffle(float2, float2, ShuffleComponent)

public static float shuffle(float2 left, float2 right, math.ShuffleComponent x)

Parameters

left float2
right float2
x math.ShuffleComponent

Returns

float

shuffle(float2, float2, ShuffleComponent, ShuffleComponent)

public static float2 shuffle(float2 left, float2 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left float2
right float2
x math.ShuffleComponent
y math.ShuffleComponent

Returns

float2

shuffle(float3, float3, ShuffleComponent)

public static float shuffle(float3 left, float3 right, math.ShuffleComponent x)

Parameters

left float3
right float3
x math.ShuffleComponent

Returns

float

shuffle(float3, float3, ShuffleComponent, ShuffleComponent)

public static float2 shuffle(float3 left, float3 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left float3
right float3
x math.ShuffleComponent
y math.ShuffleComponent

Returns

float2

shuffle(float3, float3, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static float3 shuffle(float3 left, float3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left float3
right float3
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

float3

shuffle(float4, float4, ShuffleComponent)

public static float shuffle(float4 left, float4 right, math.ShuffleComponent x)

Parameters

left float4
right float4
x math.ShuffleComponent

Returns

float

shuffle(float4, float4, ShuffleComponent, ShuffleComponent)

public static float2 shuffle(float4 left, float4 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left float4
right float4
x math.ShuffleComponent
y math.ShuffleComponent

Returns

float2

shuffle(float4, float4, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static float3 shuffle(float4 left, float4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left float4
right float4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

float3

shuffle(float4, float4, ShuffleComponent, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static float4 shuffle(float4 left, float4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z, math.ShuffleComponent w)

Parameters

left float4
right float4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent
w math.ShuffleComponent

Returns

float4

shuffle(int2, int2, ShuffleComponent)

public static int shuffle(int2 left, int2 right, math.ShuffleComponent x)

Parameters

left int2
right int2
x math.ShuffleComponent

Returns

int

shuffle(int2, int2, ShuffleComponent, ShuffleComponent)

public static int2 shuffle(int2 left, int2 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left int2
right int2
x math.ShuffleComponent
y math.ShuffleComponent

Returns

int2

shuffle(int3, int3, ShuffleComponent)

public static int shuffle(int3 left, int3 right, math.ShuffleComponent x)

Parameters

left int3
right int3
x math.ShuffleComponent

Returns

int

shuffle(int3, int3, ShuffleComponent, ShuffleComponent)

public static int2 shuffle(int3 left, int3 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left int3
right int3
x math.ShuffleComponent
y math.ShuffleComponent

Returns

int2

shuffle(int3, int3, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static int3 shuffle(int3 left, int3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left int3
right int3
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

int3

shuffle(int4, int4, ShuffleComponent)

public static int shuffle(int4 left, int4 right, math.ShuffleComponent x)

Parameters

left int4
right int4
x math.ShuffleComponent

Returns

int

shuffle(int4, int4, ShuffleComponent, ShuffleComponent)

public static int2 shuffle(int4 left, int4 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left int4
right int4
x math.ShuffleComponent
y math.ShuffleComponent

Returns

int2

shuffle(int4, int4, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static int3 shuffle(int4 left, int4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left int4
right int4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

int3

shuffle(int4, int4, ShuffleComponent, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static int4 shuffle(int4 left, int4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z, math.ShuffleComponent w)

Parameters

left int4
right int4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent
w math.ShuffleComponent

Returns

int4

shuffle(uint2, uint2, ShuffleComponent)

public static uint shuffle(uint2 left, uint2 right, math.ShuffleComponent x)

Parameters

left uint2
right uint2
x math.ShuffleComponent

Returns

uint

shuffle(uint2, uint2, ShuffleComponent, ShuffleComponent)

public static uint2 shuffle(uint2 left, uint2 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left uint2
right uint2
x math.ShuffleComponent
y math.ShuffleComponent

Returns

uint2

shuffle(uint3, uint3, ShuffleComponent)

public static uint shuffle(uint3 left, uint3 right, math.ShuffleComponent x)

Parameters

left uint3
right uint3
x math.ShuffleComponent

Returns

uint

shuffle(uint3, uint3, ShuffleComponent, ShuffleComponent)

public static uint2 shuffle(uint3 left, uint3 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left uint3
right uint3
x math.ShuffleComponent
y math.ShuffleComponent

Returns

uint2

shuffle(uint3, uint3, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static uint3 shuffle(uint3 left, uint3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left uint3
right uint3
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

uint3

shuffle(uint4, uint4, ShuffleComponent)

public static uint shuffle(uint4 left, uint4 right, math.ShuffleComponent x)

Parameters

left uint4
right uint4
x math.ShuffleComponent

Returns

uint

shuffle(uint4, uint4, ShuffleComponent, ShuffleComponent)

public static uint2 shuffle(uint4 left, uint4 right, math.ShuffleComponent x, math.ShuffleComponent y)

Parameters

left uint4
right uint4
x math.ShuffleComponent
y math.ShuffleComponent

Returns

uint2

shuffle(uint4, uint4, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static uint3 shuffle(uint4 left, uint4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)

Parameters

left uint4
right uint4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent

Returns

uint3

shuffle(uint4, uint4, ShuffleComponent, ShuffleComponent, ShuffleComponent, ShuffleComponent)

public static uint4 shuffle(uint4 left, uint4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z, math.ShuffleComponent w)

Parameters

left uint4
right uint4
x math.ShuffleComponent
y math.ShuffleComponent
z math.ShuffleComponent
w math.ShuffleComponent

Returns

uint4

sign(double2)

Returns the componentwise sign of a double2 value. 1.0 for positive components, 0.0 for zero components and -1.0 for negative components.

public static double2 sign(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise sign of the input.

sign(double3)

Returns the componentwise sign of a double3 value. 1.0 for positive components, 0.0 for zero components and -1.0 for negative components.

public static double3 sign(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise sign of the input.

sign(double4)

Returns the componentwise sign of a double4 value. 1.0 for positive components, 0.0 for zero components and -1.0 for negative components.

public static double4 sign(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise sign of the input.

sign(float2)

Returns the componentwise sign of a float2 value. 1.0f for positive components, 0.0f for zero components and -1.0f for negative components.

public static float2 sign(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise sign of the input.

sign(float3)

Returns the componentwise sign of a float3 value. 1.0f for positive components, 0.0f for zero components and -1.0f for negative components.

public static float3 sign(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise sign of the input.

sign(float4)

Returns the componentwise sign of a float4 value. 1.0f for positive components, 0.0f for zero components and -1.0f for negative components.

public static float4 sign(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise sign of the input.

sign(int2)

Returns the componentwise sign of a int2 value. 1 for positive components, 0 for zero components and -1 for negative components.

public static int2 sign(int2 x)

Parameters

x int2

Input value.

Returns

int2

The componentwise sign of the input.

sign(int3)

Returns the componentwise sign of a int3 value. 1 for positive components, 0 for zero components and -1 for negative components.

public static int3 sign(int3 x)

Parameters

x int3

Input value.

Returns

int3

The componentwise sign of the input.

sign(int4)

Returns the componentwise sign of a int4 value. 1 for positive components, 0 for zero components and -1 for negative components.

public static int4 sign(int4 x)

Parameters

x int4

Input value.

Returns

int4

The componentwise sign of the input.

sign(double)

Returns the sign of a double value. -1.0 if it is less than zero, 0.0 if it is zero and 1.0 if it greater than zero.

public static double sign(double x)

Parameters

x double

Input value.

Returns

double

The sign of the input.

sign(int)

Returns the sign of a int value. -1 if it is less than zero, 0 if it is zero and 1 if it greater than zero.

public static int sign(int x)

Parameters

x int

Input value.

Returns

int

The sign of the input.

sign(float)

Returns the sign of a float value. -1.0f if it is less than zero, 0.0f if it is zero and 1.0f if it greater than zero.

public static float sign(float x)

Parameters

x float

Input value.

Returns

float

The sign of the input.

sin(double2)

Returns the componentwise sine of a double2 vector.

public static double2 sin(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise sine of the input.

sin(double3)

Returns the componentwise sine of a double3 vector.

public static double3 sin(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise sine of the input.

sin(double4)

Returns the componentwise sine of a double4 vector.

public static double4 sin(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise sine of the input.

sin(float2)

Returns the componentwise sine of a float2 vector.

public static float2 sin(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise sine of the input.

sin(float3)

Returns the componentwise sine of a float3 vector.

public static float3 sin(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise sine of the input.

sin(float4)

Returns the componentwise sine of a float4 vector.

public static float4 sin(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise sine of the input.

sin(double)

Returns the sine of a double value.

public static double sin(double x)

Parameters

x double

Input value.

Returns

double

The sine of the input.

sin(float)

Returns the sine of a float value.

public static float sin(float x)

Parameters

x float

Input value.

Returns

float

The sine of the input.

sincos(double2, out double2, out double2)

Returns the componentwise sine and cosine of the input double2 vector x through the out parameters s and c.

public static void sincos(double2 x, out double2 s, out double2 c)

Parameters

x double2

Input vector containing angles in radians.

s double2

Output vector containing the componentwise sine of the input.

c double2

Output vector containing the componentwise cosine of the input.

Remarks

When Burst compiled, his method is faster than calling sin() and cos() separately.

sincos(double3, out double3, out double3)

Returns the componentwise sine and cosine of the input double3 vector x through the out parameters s and c.

public static void sincos(double3 x, out double3 s, out double3 c)

Parameters

x double3

Input vector containing angles in radians.

s double3

Output vector containing the componentwise sine of the input.

c double3

Output vector containing the componentwise cosine of the input.

Remarks

When Burst compiled, his method is faster than calling sin() and cos() separately.

sincos(double4, out double4, out double4)

Returns the componentwise sine and cosine of the input double4 vector x through the out parameters s and c.

public static void sincos(double4 x, out double4 s, out double4 c)

Parameters

x double4

Input vector containing angles in radians.

s double4

Output vector containing the componentwise sine of the input.

c double4

Output vector containing the componentwise cosine of the input.

Remarks

When Burst compiled, his method is faster than calling sin() and cos() separately.

sincos(float2, out float2, out float2)

Returns the componentwise sine and cosine of the input float2 vector x through the out parameters s and c.

public static void sincos(float2 x, out float2 s, out float2 c)

Parameters

x float2

Input vector containing angles in radians.

s float2

Output vector containing the componentwise sine of the input.

c float2

Output vector containing the componentwise cosine of the input.

Remarks

When Burst compiled, his method is faster than calling sin() and cos() separately.

sincos(float3, out float3, out float3)

Returns the componentwise sine and cosine of the input float3 vector x through the out parameters s and c.

public static void sincos(float3 x, out float3 s, out float3 c)

Parameters

x float3

Input vector containing angles in radians.

s float3

Output vector containing the componentwise sine of the input.

c float3

Output vector containing the componentwise cosine of the input.

Remarks

When Burst compiled, his method is faster than calling sin() and cos() separately.

sincos(float4, out float4, out float4)

Returns the componentwise sine and cosine of the input float4 vector x through the out parameters s and c.

public static void sincos(float4 x, out float4 s, out float4 c)

Parameters

x float4

Input vector containing angles in radians.

s float4

Output vector containing the componentwise sine of the input.

c float4

Output vector containing the componentwise cosine of the input.

Remarks

When Burst compiled, his method is faster than calling sin() and cos() separately.

sincos(double, out double, out double)

Returns the sine and cosine of the input double value x through the out parameters s and c.

public static void sincos(double x, out double s, out double c)

Parameters

x double

Input angle in radians.

s double

Output sine of the input.

c double

Output cosine of the input.

Remarks

When Burst compiled, his method is faster than calling sin() and cos() separately.

sincos(float, out float, out float)

Returns the sine and cosine of the input float value x through the out parameters s and c.

public static void sincos(float x, out float s, out float c)

Parameters

x float

Input angle in radians.

s float

Output sine of the input.

c float

Output cosine of the input.

Remarks

When Burst compiled, his method is faster than calling sin() and cos() separately.

sinh(double2)

Returns the componentwise hyperbolic sine of a double2 vector.

public static double2 sinh(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise hyperbolic sine of the input.

sinh(double3)

Returns the componentwise hyperbolic sine of a double3 vector.

public static double3 sinh(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise hyperbolic sine of the input.

sinh(double4)

Returns the componentwise hyperbolic sine of a double4 vector.

public static double4 sinh(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise hyperbolic sine of the input.

sinh(float2)

Returns the componentwise hyperbolic sine of a float2 vector.

public static float2 sinh(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise hyperbolic sine of the input.

sinh(float3)

Returns the componentwise hyperbolic sine of a float3 vector.

public static float3 sinh(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise hyperbolic sine of the input.

sinh(float4)

Returns the componentwise hyperbolic sine of a float4 vector.

public static float4 sinh(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise hyperbolic sine of the input.

sinh(double)

Returns the hyperbolic sine of a double value.

public static double sinh(double x)

Parameters

x double

Input value.

Returns

double

The hyperbolic sine of the input.

sinh(float)

Returns the hyperbolic sine of a float value.

public static float sinh(float x)

Parameters

x float

Input value.

Returns

float

The hyperbolic sine of the input.

slerp(quaternion, quaternion, float)

Returns the result of a spherical interpolation between two quaternions q1 and a2 using an interpolation parameter t.

public static quaternion slerp(quaternion q1, quaternion q2, float t)

Parameters

q1 quaternion

The first quaternion.

q2 quaternion

The second quaternion.

t float

The interpolation parameter.

Returns

quaternion

The spherical linear interpolation of two quaternions.

smoothstep(double2, double2, double2)

Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) [xMin, xMax].

public static double2 smoothstep(double2 xMin, double2 xMax, double2 x)

Parameters

xMin double2

The minimum range of the x parameter.

xMax double2

The maximum range of the x parameter.

x double2

The value to be interpolated.

Returns

double2

Returns component values camped to the range [0, 1].

smoothstep(double3, double3, double3)

Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) [xMin, xMax].

public static double3 smoothstep(double3 xMin, double3 xMax, double3 x)

Parameters

xMin double3

The minimum range of the x parameter.

xMax double3

The maximum range of the x parameter.

x double3

The value to be interpolated.

Returns

double3

Returns component values camped to the range [0, 1].

smoothstep(double4, double4, double4)

Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) [xMin, xMax].

public static double4 smoothstep(double4 xMin, double4 xMax, double4 x)

Parameters

xMin double4

The minimum range of the x parameter.

xMax double4

The maximum range of the x parameter.

x double4

The value to be interpolated.

Returns

double4

Returns component values camped to the range [0, 1].

smoothstep(float2, float2, float2)

Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax].

public static float2 smoothstep(float2 xMin, float2 xMax, float2 x)

Parameters

xMin float2

The minimum range of the x parameter.

xMax float2

The maximum range of the x parameter.

x float2

The value to be interpolated.

Returns

float2

Returns component values camped to the range [0, 1].

smoothstep(float3, float3, float3)

Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax].

public static float3 smoothstep(float3 xMin, float3 xMax, float3 x)

Parameters

xMin float3

The minimum range of the x parameter.

xMax float3

The maximum range of the x parameter.

x float3

The value to be interpolated.

Returns

float3

Returns component values camped to the range [0, 1].

smoothstep(float4, float4, float4)

Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax].

public static float4 smoothstep(float4 xMin, float4 xMax, float4 x)

Parameters

xMin float4

The minimum range of the x parameter.

xMax float4

The maximum range of the x parameter.

x float4

The value to be interpolated.

Returns

float4

Returns component values camped to the range [0, 1].

smoothstep(double, double, double)

Returns a smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) [xMin, xMax].

public static double smoothstep(double xMin, double xMax, double x)

Parameters

xMin double

The minimum range of the x parameter.

xMax double

The maximum range of the x parameter.

x double

The value to be interpolated.

Returns

double

Returns a value camped to the range [0, 1].

smoothstep(float, float, float)

Returns a smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax].

public static float smoothstep(float xMin, float xMax, float x)

Parameters

xMin float

The minimum range of the x parameter.

xMax float

The maximum range of the x parameter.

x float

The value to be interpolated.

Returns

float

Returns a value camped to the range [0, 1].

sqrt(double2)

Returns the componentwise square root of a double2 vector.

public static double2 sqrt(double2 x)

Parameters

x double2

Value to use when computing square root.

Returns

double2

The componentwise square root.

sqrt(double3)

Returns the componentwise square root of a double3 vector.

public static double3 sqrt(double3 x)

Parameters

x double3

Value to use when computing square root.

Returns

double3

The componentwise square root.

sqrt(double4)

Returns the componentwise square root of a double4 vector.

public static double4 sqrt(double4 x)

Parameters

x double4

Value to use when computing square root.

Returns

double4

The componentwise square root.

sqrt(float2)

Returns the componentwise square root of a float2 vector.

public static float2 sqrt(float2 x)

Parameters

x float2

Value to use when computing square root.

Returns

float2

The componentwise square root.

sqrt(float3)

Returns the componentwise square root of a float3 vector.

public static float3 sqrt(float3 x)

Parameters

x float3

Value to use when computing square root.

Returns

float3

The componentwise square root.

sqrt(float4)

Returns the componentwise square root of a float4 vector.

public static float4 sqrt(float4 x)

Parameters

x float4

Value to use when computing square root.

Returns

float4

The componentwise square root.

sqrt(double)

Returns the square root of a double value.

public static double sqrt(double x)

Parameters

x double

Value to use when computing square root.

Returns

double

The square root.

sqrt(float)

Returns the square root of a float value.

public static float sqrt(float x)

Parameters

x float

Value to use when computing square root.

Returns

float

The square root.

square(double2)

Computes the component-wise square (x * x) of the input argument x.

public static double2 square(double2 x)

Parameters

x double2

Value to square.

Returns

double2

Returns the square of the input.

square(double3)

Computes the component-wise square (x * x) of the input argument x.

public static double3 square(double3 x)

Parameters

x double3

Value to square.

Returns

double3

Returns the square of the input.

square(double4)

Computes the component-wise square (x * x) of the input argument x.

public static double4 square(double4 x)

Parameters

x double4

Value to square.

Returns

double4

Returns the square of the input.

square(float2)

Computes the component-wise square (x * x) of the input argument x.

public static float2 square(float2 x)

Parameters

x float2

Value to square.

Returns

float2

Returns the square of the input.

square(float3)

Computes the component-wise square (x * x) of the input argument x.

public static float3 square(float3 x)

Parameters

x float3

Value to square.

Returns

float3

Returns the square of the input.

square(float4)

Computes the component-wise square (x * x) of the input argument x.

public static float4 square(float4 x)

Parameters

x float4

Value to square.

Returns

float4

Returns the square of the input.

square(int2)

Computes the component-wise square (x * x) of the input argument x.

public static int2 square(int2 x)

Parameters

x int2

Value to square.

Returns

int2

Returns the square of the input.

Remarks

Due to integer overflow, it's not always guaranteed that square(x) is positive. For example, square(new int2(46341)) will return new int2(-2147479015).

square(int3)

Computes the component-wise square (x * x) of the input argument x.

public static int3 square(int3 x)

Parameters

x int3

Value to square.

Returns

int3

Returns the square of the input.

Remarks

Due to integer overflow, it's not always guaranteed that square(x) is positive. For example, square(new int3(46341)) will return new int3(-2147479015).

square(int4)

Computes the component-wise square (x * x) of the input argument x.

public static int4 square(int4 x)

Parameters

x int4

Value to square.

Returns

int4

Returns the square of the input.

Remarks

Due to integer overflow, it's not always guaranteed that square(x) is positive. For example, square(new int4(46341)) will return new int4(-2147479015).

square(uint2)

Computes the component-wise square (x * x) of the input argument x.

public static uint2 square(uint2 x)

Parameters

x uint2

Value to square.

Returns

uint2

Returns the square of the input.

Remarks

Due to integer overflow, it's not always guaranteed that square(x) >= x. For example, square(new uint2(4294967295u)) will return new uint2(1u).

square(uint3)

Computes the component-wise square (x * x) of the input argument x.

public static uint3 square(uint3 x)

Parameters

x uint3

Value to square.

Returns

uint3

Returns the square of the input.

Remarks

Due to integer overflow, it's not always guaranteed that square(x) >= x. For example, square(new uint3(4294967295u)) will return new uint3(1u).

square(uint4)

Computes the component-wise square (x * x) of the input argument x.

public static uint4 square(uint4 x)

Parameters

x uint4

Value to square.

Returns

uint4

Returns the square of the input.

Remarks

Due to integer overflow, it's not always guaranteed that square(x) >= x. For example, square(new uint4(4294967295u)) will return new uint4(1u).

square(double)

Computes the square (x * x) of the input argument x.

public static double square(double x)

Parameters

x double

Value to square.

Returns

double

Returns the square of the input.

square(int)

Computes the square (x * x) of the input argument x.

public static int square(int x)

Parameters

x int

Value to square.

Returns

int

Returns the square of the input.

Remarks

Due to integer overflow, it's not always guaranteed that square(x) is positive. For example, square(46341) will return -2147479015.

square(float)

Computes the square (x * x) of the input argument x.

public static float square(float x)

Parameters

x float

Value to square.

Returns

float

Returns the square of the input.

square(uint)

Computes the square (x * x) of the input argument x.

public static uint square(uint x)

Parameters

x uint

Value to square.

Returns

uint

Returns the square of the input.

Remarks

Due to integer overflow, it's not always guaranteed that square(x) >= x. For example, square(4294967295u) will return 1u.

step(double2, double2)

Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise.

public static double2 step(double2 threshold, double2 x)

Parameters

threshold double2

Vector of values to be used as a threshold for returning 1.

x double2

Vector of values to compare against threshold.

Returns

double2

1 if the componentwise comparison x >= threshold is true, otherwise 0.

step(double3, double3)

Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise.

public static double3 step(double3 threshold, double3 x)

Parameters

threshold double3

Vector of values to be used as a threshold for returning 1.

x double3

Vector of values to compare against threshold.

Returns

double3

1 if the componentwise comparison x >= threshold is true, otherwise 0.

step(double4, double4)

Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise.

public static double4 step(double4 threshold, double4 x)

Parameters

threshold double4

Vector of values to be used as a threshold for returning 1.

x double4

Vector of values to compare against threshold.

Returns

double4

1 if the componentwise comparison x >= threshold is true, otherwise 0.

step(float2, float2)

Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise.

public static float2 step(float2 threshold, float2 x)

Parameters

threshold float2

Vector of values to be used as a threshold for returning 1.

x float2

Vector of values to compare against threshold.

Returns

float2

1 if the componentwise comparison x >= threshold is true, otherwise 0.

step(float3, float3)

Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise.

public static float3 step(float3 threshold, float3 x)

Parameters

threshold float3

Vector of values to be used as a threshold for returning 1.

x float3

Vector of values to compare against threshold.

Returns

float3

1 if the componentwise comparison x >= threshold is true, otherwise 0.

step(float4, float4)

Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise.

public static float4 step(float4 threshold, float4 x)

Parameters

threshold float4

Vector of values to be used as a threshold for returning 1.

x float4

Vector of values to compare against threshold.

Returns

float4

1 if the componentwise comparison x >= threshold is true, otherwise 0.

step(double, double)

Returns the result of a step function where the result is 1.0f when x >= threshold and 0.0f otherwise.

public static double step(double threshold, double x)

Parameters

threshold double

Values to be used as a threshold for returning 1.

x double

Value to compare against threshold.

Returns

double

1 if the comparison x >= threshold is true, otherwise 0.

step(float, float)

Returns the result of a step function where the result is 1.0f when x >= threshold and 0.0f otherwise.

public static float step(float threshold, float x)

Parameters

threshold float

Value to be used as a threshold for returning 1.

x float

Value to compare against threshold.

Returns

float

1 if the comparison x >= threshold is true, otherwise 0.

tan(double2)

Returns the componentwise tangent of a double2 vector.

public static double2 tan(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise tangent of the input.

tan(double3)

Returns the componentwise tangent of a double3 vector.

public static double3 tan(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise tangent of the input.

tan(double4)

Returns the componentwise tangent of a double4 vector.

public static double4 tan(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise tangent of the input.

tan(float2)

Returns the componentwise tangent of a float2 vector.

public static float2 tan(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise tangent of the input.

tan(float3)

Returns the componentwise tangent of a float3 vector.

public static float3 tan(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise tangent of the input.

tan(float4)

Returns the componentwise tangent of a float4 vector.

public static float4 tan(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise tangent of the input.

tan(double)

Returns the tangent of a double value.

public static double tan(double x)

Parameters

x double

Input value.

Returns

double

The tangent of the input.

tan(float)

Returns the tangent of a float value.

public static float tan(float x)

Parameters

x float

Input value.

Returns

float

The tangent of the input.

tanh(double2)

Returns the componentwise hyperbolic tangent of a double2 vector.

public static double2 tanh(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise hyperbolic tangent of the input.

tanh(double3)

Returns the componentwise hyperbolic tangent of a double3 vector.

public static double3 tanh(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise hyperbolic tangent of the input.

tanh(double4)

Returns the componentwise hyperbolic tangent of a double4 vector.

public static double4 tanh(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise hyperbolic tangent of the input.

tanh(float2)

Returns the componentwise hyperbolic tangent of a float2 vector.

public static float2 tanh(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise hyperbolic tangent of the input.

tanh(float3)

Returns the componentwise hyperbolic tangent of a float3 vector.

public static float3 tanh(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise hyperbolic tangent of the input.

tanh(float4)

Returns the componentwise hyperbolic tangent of a float4 vector.

public static float4 tanh(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise hyperbolic tangent of the input.

tanh(double)

Returns the hyperbolic tangent of a double value.

public static double tanh(double x)

Parameters

x double

Input value.

Returns

double

The hyperbolic tangent of the input.

tanh(float)

Returns the hyperbolic tangent of a float value.

public static float tanh(float x)

Parameters

x float

Input value.

Returns

float

The hyperbolic tangent of the input.

transpose(bool2x2)

public static bool2x2 transpose(bool2x2 value)

Parameters

value bool2x2

Returns

bool2x2

transpose(bool2x3)

public static bool3x2 transpose(bool2x3 value)

Parameters

value bool2x3

Returns

bool3x2

transpose(bool2x4)

public static bool4x2 transpose(bool2x4 value)

Parameters

value bool2x4

Returns

bool4x2

transpose(bool3x2)

public static bool2x3 transpose(bool3x2 value)

Parameters

value bool3x2

Returns

bool2x3

transpose(bool3x3)

public static bool3x3 transpose(bool3x3 value)

Parameters

value bool3x3

Returns

bool3x3

transpose(bool3x4)

public static bool4x3 transpose(bool3x4 value)

Parameters

value bool3x4

Returns

bool4x3

transpose(bool4x2)

public static bool2x4 transpose(bool4x2 value)

Parameters

value bool4x2

Returns

bool2x4

transpose(bool4x3)

public static bool3x4 transpose(bool4x3 value)

Parameters

value bool4x3

Returns

bool3x4

transpose(bool4x4)

public static bool4x4 transpose(bool4x4 value)

Parameters

value bool4x4

Returns

bool4x4

transpose(double2x2)

public static double2x2 transpose(double2x2 value)

Parameters

value double2x2

Returns

double2x2

transpose(double2x3)

public static double3x2 transpose(double2x3 value)

Parameters

value double2x3

Returns

double3x2

transpose(double2x4)

public static double4x2 transpose(double2x4 value)

Parameters

value double2x4

Returns

double4x2

transpose(double3x2)

public static double2x3 transpose(double3x2 value)

Parameters

value double3x2

Returns

double2x3

transpose(double3x3)

public static double3x3 transpose(double3x3 value)

Parameters

value double3x3

Returns

double3x3

transpose(double3x4)

public static double4x3 transpose(double3x4 value)

Parameters

value double3x4

Returns

double4x3

transpose(double4x2)

public static double2x4 transpose(double4x2 value)

Parameters

value double4x2

Returns

double2x4

transpose(double4x3)

public static double3x4 transpose(double4x3 value)

Parameters

value double4x3

Returns

double3x4

transpose(double4x4)

public static double4x4 transpose(double4x4 value)

Parameters

value double4x4

Returns

double4x4

transpose(float2x2)

public static float2x2 transpose(float2x2 value)

Parameters

value float2x2

Returns

float2x2

transpose(float2x3)

public static float3x2 transpose(float2x3 value)

Parameters

value float2x3

Returns

float3x2

transpose(float2x4)

public static float4x2 transpose(float2x4 value)

Parameters

value float2x4

Returns

float4x2

transpose(float3x2)

public static float2x3 transpose(float3x2 value)

Parameters

value float3x2

Returns

float2x3

transpose(float3x3)

public static float3x3 transpose(float3x3 value)

Parameters

value float3x3

Returns

float3x3

transpose(float3x4)

public static float4x3 transpose(float3x4 value)

Parameters

value float3x4

Returns

float4x3

transpose(float4x2)

public static float2x4 transpose(float4x2 value)

Parameters

value float4x2

Returns

float2x4

transpose(float4x3)

public static float3x4 transpose(float4x3 value)

Parameters

value float4x3

Returns

float3x4

transpose(float4x4)

public static float4x4 transpose(float4x4 value)

Parameters

value float4x4

Returns

float4x4

transpose(int2x2)

public static int2x2 transpose(int2x2 value)

Parameters

value int2x2

Returns

int2x2

transpose(int2x3)

public static int3x2 transpose(int2x3 value)

Parameters

value int2x3

Returns

int3x2

transpose(int2x4)

public static int4x2 transpose(int2x4 value)

Parameters

value int2x4

Returns

int4x2

transpose(int3x2)

public static int2x3 transpose(int3x2 value)

Parameters

value int3x2

Returns

int2x3

transpose(int3x3)

public static int3x3 transpose(int3x3 value)

Parameters

value int3x3

Returns

int3x3

transpose(int3x4)

public static int4x3 transpose(int3x4 value)

Parameters

value int3x4

Returns

int4x3

transpose(int4x2)

public static int2x4 transpose(int4x2 value)

Parameters

value int4x2

Returns

int2x4

transpose(int4x3)

public static int3x4 transpose(int4x3 value)

Parameters

value int4x3

Returns

int3x4

transpose(int4x4)

public static int4x4 transpose(int4x4 value)

Parameters

value int4x4

Returns

int4x4

transpose(uint2x2)

public static uint2x2 transpose(uint2x2 value)

Parameters

value uint2x2

Returns

uint2x2

transpose(uint2x3)

public static uint3x2 transpose(uint2x3 value)

Parameters

value uint2x3

Returns

uint3x2

transpose(uint2x4)

public static uint4x2 transpose(uint2x4 value)

Parameters

value uint2x4

Returns

uint4x2

transpose(uint3x2)

public static uint2x3 transpose(uint3x2 value)

Parameters

value uint3x2

Returns

uint2x3

transpose(uint3x3)

public static uint3x3 transpose(uint3x3 value)

Parameters

value uint3x3

Returns

uint3x3

transpose(uint3x4)

public static uint4x3 transpose(uint3x4 value)

Parameters

value uint3x4

Returns

uint4x3

transpose(uint4x2)

public static uint2x4 transpose(uint4x2 value)

Parameters

value uint4x2

Returns

uint2x4

transpose(uint4x3)

public static uint3x4 transpose(uint4x3 value)

Parameters

value uint4x3

Returns

uint3x4

transpose(uint4x4)

public static uint4x4 transpose(uint4x4 value)

Parameters

value uint4x4

Returns

uint4x4

trunc(double2)

Returns the result of a componentwise truncation of a double2 value to an integral double2 value.

public static double2 trunc(double2 x)

Parameters

x double2

Input value.

Returns

double2

The componentwise truncation of the input.

trunc(double3)

Returns the result of a componentwise truncation of a double3 value to an integral double3 value.

public static double3 trunc(double3 x)

Parameters

x double3

Input value.

Returns

double3

The componentwise truncation of the input.

trunc(double4)

Returns the result of a componentwise truncation of a double4 value to an integral double4 value.

public static double4 trunc(double4 x)

Parameters

x double4

Input value.

Returns

double4

The componentwise truncation of the input.

trunc(float2)

Returns the result of a componentwise truncation of a float2 value to an integral float2 value.

public static float2 trunc(float2 x)

Parameters

x float2

Input value.

Returns

float2

The componentwise truncation of the input.

trunc(float3)

Returns the result of a componentwise truncation of a float3 value to an integral float3 value.

public static float3 trunc(float3 x)

Parameters

x float3

Input value.

Returns

float3

The componentwise truncation of the input.

trunc(float4)

Returns the result of a componentwise truncation of a float4 value to an integral float4 value.

public static float4 trunc(float4 x)

Parameters

x float4

Input value.

Returns

float4

The componentwise truncation of the input.

trunc(double)

Returns the result of truncating a double value to an integral double value.

public static double trunc(double x)

Parameters

x double

Input value.

Returns

double

The truncation of the input.

trunc(float)

Returns the result of truncating a float value to an integral float value.

public static float trunc(float x)

Parameters

x float

Input value.

Returns

float

The truncation of the input.

tzcnt(int2)

Computes the component-wise trailing zero count in the binary representation of the input value.

public static int2 tzcnt(int2 x)

Parameters

x int2

Input to use when computing the trailing zero count.

Returns

int2

Returns the component-wise trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(int3)

Computes the component-wise trailing zero count in the binary representation of the input value.

public static int3 tzcnt(int3 x)

Parameters

x int3

Input to use when computing the trailing zero count.

Returns

int3

Returns the component-wise trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(int4)

Computes the component-wise trailing zero count in the binary representation of the input value.

public static int4 tzcnt(int4 x)

Parameters

x int4

Input to use when computing the trailing zero count.

Returns

int4

Returns the component-wise trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(uint2)

Computes the component-wise trailing zero count in the binary representation of the input value.

public static int2 tzcnt(uint2 x)

Parameters

x uint2

Input to use when computing the trailing zero count.

Returns

int2

Returns the component-wise trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(uint3)

Computes the component-wise trailing zero count in the binary representation of the input value.

public static int3 tzcnt(uint3 x)

Parameters

x uint3

Input to use when computing the trailing zero count.

Returns

int3

Returns the component-wise trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(uint4)

Computes the component-wise trailing zero count in the binary representation of the input value.

public static int4 tzcnt(uint4 x)

Parameters

x uint4

Input to use when computing the trailing zero count.

Returns

int4

Returns the component-wise trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(int)

Computes the trailing zero count in the binary representation of the input value.

public static int tzcnt(int x)

Parameters

x int

Input to use when computing the trailing zero count.

Returns

int

Returns the trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(long)

Computes the trailing zero count in the binary representation of the input value.

public static int tzcnt(long x)

Parameters

x long

Input to use when computing the trailing zero count.

Returns

int

Returns the trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(uint)

Computes the trailing zero count in the binary representation of the input value.

public static int tzcnt(uint x)

Parameters

x uint

Input to use when computing the trailing zero count.

Returns

int

Returns the trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

tzcnt(ulong)

Computes the trailing zero count in the binary representation of the input value.

public static int tzcnt(ulong x)

Parameters

x ulong

Input to use when computing the trailing zero count.

Returns

int

Returns the trailing zero count of the input.

Remarks

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.

uint2(bool2)

public static uint2 uint2(bool2 v)

Parameters

v bool2

Returns

uint2

uint2(double2)

public static uint2 uint2(double2 v)

Parameters

v double2

Returns

uint2

uint2(float2)

public static uint2 uint2(float2 v)

Parameters

v float2

Returns

uint2

uint2(int2)

public static uint2 uint2(int2 v)

Parameters

v int2

Returns

uint2

uint2(uint2)

public static uint2 uint2(uint2 xy)

Parameters

xy uint2

Returns

uint2

uint2(double)

public static uint2 uint2(double v)

Parameters

v double

Returns

uint2

uint2(int)

public static uint2 uint2(int v)

Parameters

v int

Returns

uint2

uint2(float)

public static uint2 uint2(float v)

Parameters

v float

Returns

uint2

uint2(uint)

public static uint2 uint2(uint value)

Parameters

value uint

Returns

uint2

uint2(uint, uint)

public static uint2 uint2(uint x, uint y)

Parameters

x uint
y uint

Returns

uint2

uint2x2(uint2)

public static uint2x2 uint2x2(uint2 value)

Parameters

value uint2

Returns

uint2x2

uint2x2(uint2, uint2)

public static uint2x2 uint2x2(uint2 c0, uint2 c1)

Parameters

c0 uint2
c1 uint2

Returns

uint2x2

uint2x2(uint)

public static uint2x2 uint2x2(uint value)

Parameters

value uint

Returns

uint2x2

uint2x2(uint, uint, uint, uint)

public static uint2x2 uint2x2(uint m00, uint m01, uint m10, uint m11)

Parameters

m00 uint
m01 uint
m10 uint
m11 uint

Returns

uint2x2

uint2x3(uint2)

public static uint2x3 uint2x3(uint2 value)

Parameters

value uint2

Returns

uint2x3

uint2x3(uint2, uint2, uint2)

public static uint2x3 uint2x3(uint2 c0, uint2 c1, uint2 c2)

Parameters

c0 uint2
c1 uint2
c2 uint2

Returns

uint2x3

uint2x3(uint)

public static uint2x3 uint2x3(uint value)

Parameters

value uint

Returns

uint2x3

uint2x3(uint, uint, uint, uint, uint, uint)

public static uint2x3 uint2x3(uint m00, uint m01, uint m02, uint m10, uint m11, uint m12)

Parameters

m00 uint
m01 uint
m02 uint
m10 uint
m11 uint
m12 uint

Returns

uint2x3

uint2x4(uint2)

public static uint2x4 uint2x4(uint2 value)

Parameters

value uint2

Returns

uint2x4

uint2x4(uint2, uint2, uint2, uint2)

public static uint2x4 uint2x4(uint2 c0, uint2 c1, uint2 c2, uint2 c3)

Parameters

c0 uint2
c1 uint2
c2 uint2
c3 uint2

Returns

uint2x4

uint2x4(uint)

public static uint2x4 uint2x4(uint value)

Parameters

value uint

Returns

uint2x4

uint2x4(uint, uint, uint, uint, uint, uint, uint, uint)

public static uint2x4 uint2x4(uint m00, uint m01, uint m02, uint m03, uint m10, uint m11, uint m12, uint m13)

Parameters

m00 uint
m01 uint
m02 uint
m03 uint
m10 uint
m11 uint
m12 uint
m13 uint

Returns

uint2x4

uint3(bool3)

public static uint3 uint3(bool3 v)

Parameters

v bool3

Returns

uint3

uint3(double3)

public static uint3 uint3(double3 v)

Parameters

v double3

Returns

uint3

uint3(float3)

public static uint3 uint3(float3 v)

Parameters

v float3

Returns

uint3

uint3(int3)

public static uint3 uint3(int3 v)

Parameters

v int3

Returns

uint3

uint3(uint2, uint)

public static uint3 uint3(uint2 xy, uint z)

Parameters

xy uint2
z uint

Returns

uint3

uint3(uint3)

public static uint3 uint3(uint3 xyz)

Parameters

xyz uint3

Returns

uint3

uint3(double)

public static uint3 uint3(double v)

Parameters

v double

Returns

uint3

uint3(int)

public static uint3 uint3(int v)

Parameters

v int

Returns

uint3

uint3(float)

public static uint3 uint3(float v)

Parameters

v float

Returns

uint3

uint3(uint)

public static uint3 uint3(uint value)

Parameters

value uint

Returns

uint3

uint3(uint, uint2)

public static uint3 uint3(uint x, uint2 yz)

Parameters

x uint
yz uint2

Returns

uint3

uint3(uint, uint, uint)

public static uint3 uint3(uint x, uint y, uint z)

Parameters

x uint
y uint
z uint

Returns

uint3

uint3x2(uint3)

public static uint3x2 uint3x2(uint3 value)

Parameters

value uint3

Returns

uint3x2

uint3x2(uint3, uint3)

public static uint3x2 uint3x2(uint3 c0, uint3 c1)

Parameters

c0 uint3
c1 uint3

Returns

uint3x2

uint3x2(uint)

public static uint3x2 uint3x2(uint value)

Parameters

value uint

Returns

uint3x2

uint3x2(uint, uint, uint, uint, uint, uint)

public static uint3x2 uint3x2(uint m00, uint m01, uint m10, uint m11, uint m20, uint m21)

Parameters

m00 uint
m01 uint
m10 uint
m11 uint
m20 uint
m21 uint

Returns

uint3x2

uint3x3(uint3)

public static uint3x3 uint3x3(uint3 value)

Parameters

value uint3

Returns

uint3x3

uint3x3(uint3, uint3, uint3)

public static uint3x3 uint3x3(uint3 c0, uint3 c1, uint3 c2)

Parameters

c0 uint3
c1 uint3
c2 uint3

Returns

uint3x3

uint3x3(uint)

public static uint3x3 uint3x3(uint value)

Parameters

value uint

Returns

uint3x3

uint3x3(uint, uint, uint, uint, uint, uint, uint, uint, uint)

public static uint3x3 uint3x3(uint m00, uint m01, uint m02, uint m10, uint m11, uint m12, uint m20, uint m21, uint m22)

Parameters

m00 uint
m01 uint
m02 uint
m10 uint
m11 uint
m12 uint
m20 uint
m21 uint
m22 uint

Returns

uint3x3

uint3x4(uint3)

public static uint3x4 uint3x4(uint3 value)

Parameters

value uint3

Returns

uint3x4

uint3x4(uint3, uint3, uint3, uint3)

public static uint3x4 uint3x4(uint3 c0, uint3 c1, uint3 c2, uint3 c3)

Parameters

c0 uint3
c1 uint3
c2 uint3
c3 uint3

Returns

uint3x4

uint3x4(uint)

public static uint3x4 uint3x4(uint value)

Parameters

value uint

Returns

uint3x4

uint3x4(uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint)

public static uint3x4 uint3x4(uint m00, uint m01, uint m02, uint m03, uint m10, uint m11, uint m12, uint m13, uint m20, uint m21, uint m22, uint m23)

Parameters

m00 uint
m01 uint
m02 uint
m03 uint
m10 uint
m11 uint
m12 uint
m13 uint
m20 uint
m21 uint
m22 uint
m23 uint

Returns

uint3x4

uint4(bool4)

public static uint4 uint4(bool4 v)

Parameters

v bool4

Returns

uint4

uint4(double4)

public static uint4 uint4(double4 v)

Parameters

v double4

Returns

uint4

uint4(float4)

public static uint4 uint4(float4 v)

Parameters

v float4

Returns

uint4

uint4(int4)

public static uint4 uint4(int4 v)

Parameters

v int4

Returns

uint4

uint4(uint2, uint2)

public static uint4 uint4(uint2 xy, uint2 zw)

Parameters

xy uint2
zw uint2

Returns

uint4

uint4(uint2, uint, uint)

public static uint4 uint4(uint2 xy, uint z, uint w)

Parameters

xy uint2
z uint
w uint

Returns

uint4

uint4(uint3, uint)

public static uint4 uint4(uint3 xyz, uint w)

Parameters

xyz uint3
w uint

Returns

uint4

uint4(double)

public static uint4 uint4(double v)

Parameters

v double

Returns

uint4

uint4(int)

public static uint4 uint4(int v)

Parameters

v int

Returns

uint4

uint4(float)

public static uint4 uint4(float v)

Parameters

v float

Returns

uint4

uint4(uint)

public static uint4 uint4(uint value)

Parameters

value uint

Returns

uint4

uint4(uint, uint2, uint)

public static uint4 uint4(uint x, uint2 yz, uint w)

Parameters

x uint
yz uint2
w uint

Returns

uint4

uint4(uint, uint3)

public static uint4 uint4(uint x, uint3 yzw)

Parameters

x uint
yzw uint3

Returns

uint4

uint4(uint, uint, uint2)

public static uint4 uint4(uint x, uint y, uint2 zw)

Parameters

x uint
y uint
zw uint2

Returns

uint4

uint4(uint, uint, uint, uint)

public static uint4 uint4(uint x, uint y, uint z, uint w)

Parameters

x uint
y uint
z uint
w uint

Returns

uint4

uint4x2(uint4)

public static uint4x2 uint4x2(uint4 value)

Parameters

value uint4

Returns

uint4x2

uint4x2(uint4, uint4)

public static uint4x2 uint4x2(uint4 c0, uint4 c1)

Parameters

c0 uint4
c1 uint4

Returns

uint4x2

uint4x2(uint)

public static uint4x2 uint4x2(uint value)

Parameters

value uint

Returns

uint4x2

uint4x2(uint, uint, uint, uint, uint, uint, uint, uint)

public static uint4x2 uint4x2(uint m00, uint m01, uint m10, uint m11, uint m20, uint m21, uint m30, uint m31)

Parameters

m00 uint
m01 uint
m10 uint
m11 uint
m20 uint
m21 uint
m30 uint
m31 uint

Returns

uint4x2

uint4x3(uint4)

public static uint4x3 uint4x3(uint4 value)

Parameters

value uint4

Returns

uint4x3

uint4x3(uint4, uint4, uint4)

public static uint4x3 uint4x3(uint4 c0, uint4 c1, uint4 c2)

Parameters

c0 uint4
c1 uint4
c2 uint4

Returns

uint4x3

uint4x3(uint)

public static uint4x3 uint4x3(uint value)

Parameters

value uint

Returns

uint4x3

uint4x3(uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint)

public static uint4x3 uint4x3(uint m00, uint m01, uint m02, uint m10, uint m11, uint m12, uint m20, uint m21, uint m22, uint m30, uint m31, uint m32)

Parameters

m00 uint
m01 uint
m02 uint
m10 uint
m11 uint
m12 uint
m20 uint
m21 uint
m22 uint
m30 uint
m31 uint
m32 uint

Returns

uint4x3

uint4x4(uint4)

public static uint4x4 uint4x4(uint4 value)

Parameters

value uint4

Returns

uint4x4

uint4x4(uint4, uint4, uint4, uint4)

public static uint4x4 uint4x4(uint4 c0, uint4 c1, uint4 c2, uint4 c3)

Parameters

c0 uint4
c1 uint4
c2 uint4
c3 uint4

Returns

uint4x4

uint4x4(uint)

public static uint4x4 uint4x4(uint value)

Parameters

value uint

Returns

uint4x4

uint4x4(uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint)

public static uint4x4 uint4x4(uint m00, uint m01, uint m02, uint m03, uint m10, uint m11, uint m12, uint m13, uint m20, uint m21, uint m22, uint m23, uint m30, uint m31, uint m32, uint m33)

Parameters

m00 uint
m01 uint
m02 uint
m03 uint
m10 uint
m11 uint
m12 uint
m13 uint
m20 uint
m21 uint
m22 uint
m23 uint
m30 uint
m31 uint
m32 uint
m33 uint

Returns

uint4x4

unitexp(quaternion)

Returns the natural exponent of a quaternion. Assumes w is zero.

public static quaternion unitexp(quaternion q)

Parameters

q quaternion

The quaternion with w component equal to zero.

Returns

quaternion

The natural exponent of the input quaternion.

unitlog(quaternion)

Returns the natural logarithm of a unit length quaternion.

public static quaternion unitlog(quaternion q)

Parameters

q quaternion

The unit length quaternion.

Returns

quaternion

The natural logarithm of the unit length quaternion.

unlerp(double2, double2, double2)

Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a).

public static double2 unlerp(double2 start, double2 end, double2 x)

Parameters

start double2

The start point of the range.

end double2

The end point of the range.

x double2

The value to normalize to the range.

Returns

double2

The componentwise interpolation parameter of x with respect to the input range [a, b].

unlerp(double3, double3, double3)

Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a).

public static double3 unlerp(double3 start, double3 end, double3 x)

Parameters

start double3

The start point of the range.

end double3

The end point of the range.

x double3

The value to normalize to the range.

Returns

double3

The componentwise interpolation parameter of x with respect to the input range [a, b].

unlerp(double4, double4, double4)

Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a).

public static double4 unlerp(double4 start, double4 end, double4 x)

Parameters

start double4

The start point of the range.

end double4

The end point of the range.

x double4

The value to normalize to the range.

Returns

double4

The componentwise interpolation parameter of x with respect to the input range [a, b].

unlerp(float2, float2, float2)

Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a).

public static float2 unlerp(float2 start, float2 end, float2 x)

Parameters

start float2

The start point of the range.

end float2

The end point of the range.

x float2

The value to normalize to the range.

Returns

float2

The componentwise interpolation parameter of x with respect to the input range [a, b].

unlerp(float3, float3, float3)

Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a).

public static float3 unlerp(float3 start, float3 end, float3 x)

Parameters

start float3

The start point of the range.

end float3

The end point of the range.

x float3

The value to normalize to the range.

Returns

float3

The componentwise interpolation parameter of x with respect to the input range [a, b].

unlerp(float4, float4, float4)

Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a).

public static float4 unlerp(float4 start, float4 end, float4 x)

Parameters

start float4

The start point of the range.

end float4

The end point of the range.

x float4

The value to normalize to the range.

Returns

float4

The componentwise interpolation parameter of x with respect to the input range [a, b].

unlerp(double, double, double)

Returns the result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a).

public static double unlerp(double start, double end, double x)

Parameters

start double

The start point of the range.

end double

The end point of the range.

x double

The value to normalize to the range.

Returns

double

The interpolation parameter of x with respect to the input range [a, b].

unlerp(float, float, float)

Returns the result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a).

public static float unlerp(float start, float end, float x)

Parameters

start float

The start point of the range.

end float

The end point of the range.

x float

The value to normalize to the range.

Returns

float

The interpolation parameter of x with respect to the input range [a, b].

up()

Unity's up axis (0, 1, 0).

public static float3 up()

Returns

float3

The up axis.

Remarks