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
E
The mathematical constant e also known as Euler's number. Approximately 2.72.
public const float E = 2.7182817
Field Value
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
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
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
FALSE
public const uint FALSE = 0
Field Value
FLT_MIN_NORMAL
The smallest positive normal number representable in a float.
public const float FLT_MIN_NORMAL = 1.1754944E-38
Field Value
INFINITY
Single precision constant for positive infinity.
public const float INFINITY = Infinity
Field Value
INFINITY_DBL
Double precision constant for positive infinity.
public const double INFINITY_DBL = Infinity
Field Value
LN10
The natural logarithm of 10. Approximately 2.30.
public const float LN10 = 2.3025851
Field Value
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
LN2
The natural logarithm of 2. Approximately 0.69.
public const float LN2 = 0.6931472
Field Value
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
LOG10E
The base 10 logarithm of e. Approximately 0.43.
public const float LOG10E = 0.4342945
Field Value
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
LOG2E
The base 2 logarithm of e. Approximately 1.44.
public const float LOG2E = 1.442695
Field Value
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
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
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
PI
The mathematical constant pi. Approximately 3.14.
public const float PI = 3.1415927
Field Value
PI2
The mathematical constant (2 * pi). Approximately 6.28. Also known as TAU.
public const float PI2 = 6.2831855
Field Value
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
PIHALF
The mathematical constant (pi / 2). Approximately 1.57.
public const float PIHALF = 1.5707964
Field Value
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
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
SQRT2
The square root 2. Approximately 1.41.
public const float SQRT2 = 1.4142135
Field Value
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
TAU
The mathematical constant tau. Approximately 6.28. Also known as PI2.
public const float TAU = 6.2831855
Field Value
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
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
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
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
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
Remarks
Multiplying by this constant is equivalent to using radians(double).
TRUE
public const uint TRUE = 4294967295
Field Value
Methods
BoolToMask(bool)
public static uint BoolToMask(bool b)
Parameters
bbool
Returns
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
qquaternionThe quaternion to convert to Euler angles.
ordermath.RotationOrderThe 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
qquaternionThe 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
qquaternionThe 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
qquaternionThe 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
qquaternionThe 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
qquaternionThe 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
qquaternionThe 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
Returns
UnpackVector128(Vector128<uint>)
public static Vector256<uint> UnpackVector128(Vector128<uint> vector)
Parameters
Returns
abs(double2)
Returns the componentwise absolute value of a double2 vector.
public static double2 abs(double2 x)
Parameters
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xint2Input 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
xint3Input 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
xint4Input 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
xdoubleInput 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
xintInput 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
xlongInput 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
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput value.
Returns
- double
The arccosine of the input.
acos(float)
Returns the arccosine of a float value.
public static float acos(float x)
Parameters
xfloatInput 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
xbool2Vector 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
xbool3Vector 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
xbool4Vector 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
xdouble2Vector 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
xdouble3Vector 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
xdouble4Vector 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
xfloat2Vector 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
xfloat3Vector 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
xfloat4Vector 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
xint2Vector 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
xint3Vector 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
xint4Vector 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
xuint2Vector 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
xuint3Vector 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
xuint4Vector 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
q1quaternionThe first quaternion.
q2quaternionThe 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
xbool2Vector 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
xbool3Vector 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
xbool4Vector 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
xdouble2Vector 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
xdouble3Vector 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
xdouble4Vector 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
xfloat2Vector 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
xfloat3Vector 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
xfloat4Vector 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
xint2Vector 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
xint3Vector 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
xint4Vector 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
xuint2Vector 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
xuint3Vector 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
xuint4Vector 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
xlongThe 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
xulongThe 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
xint2The 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
xint3The 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
xint4The 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
xuint2The 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
xuint3The 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
xuint4The 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
xintThe 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
xuintThe 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput value.
Returns
- double
The arcsine of the input.
asin(float)
Returns the arcsine of a float value.
public static float asin(float x)
Parameters
xfloatInput 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
xfloat2The 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
xfloat3The 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
xfloat4The 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
xuint2The 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
xuint3The 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
xuint4The 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
xfloatThe 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
xuintThe 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
xdoubleThe 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
xulongThe 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
xfloat2The 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
xfloat3The 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
xfloat4The 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
xint2The 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
xint3The 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
xint4The 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
xintThe 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
xfloatThe 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
xdoubleThe 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
xlongThe 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
xdouble2A 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
xdouble3A 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
xdouble4A 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
xfloat2A 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
xfloat3A 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
xfloat4A 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
xdoubleA 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
xfloatA 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
ydouble2Numerator of the ratio y/x, usually the y component on the unit circle.
xdouble2Denominator 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
ydouble3Numerator of the ratio y/x, usually the y component on the unit circle.
xdouble3Denominator 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
ydouble4Numerator of the ratio y/x, usually the y component on the unit circle.
xdouble4Denominator 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
yfloat2Numerator of the ratio y/x, usually the y component on the unit circle.
xfloat2Denominator 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
yfloat3Numerator of the ratio y/x, usually the y component on the unit circle.
xfloat3Denominator 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
yfloat4Numerator of the ratio y/x, usually the y component on the unit circle.
xfloat4Denominator 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
ydoubleNumerator of the ratio y/x, usually the y component on the unit circle.
xdoubleDenominator 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
yfloatNumerator of the ratio y/x, usually the y component on the unit circle.
xfloatDenominator 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
valuebool4The 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
xybool2
Returns
bool2(double2)
public static bool2 bool2(double2 v)
Parameters
vdouble2
Returns
bool2(float2)
public static bool2 bool2(float2 v)
Parameters
vfloat2
Returns
bool2(int2)
public static bool2 bool2(int2 v)
Parameters
vint2
Returns
bool2(uint2)
public static bool2 bool2(uint2 v)
Parameters
vuint2
Returns
bool2(uint)
public static bool2 bool2(uint value)
Parameters
valueuint
Returns
bool2(uint, uint)
public static bool2 bool2(uint x, uint y)
Parameters
Returns
bool2x2(bool2)
public static bool2x2 bool2x2(bool2 value)
Parameters
valuebool2
Returns
bool2x2(bool2, bool2)
public static bool2x2 bool2x2(bool2 c0, bool2 c1)
Parameters
Returns
bool2x2(uint)
public static bool2x2 bool2x2(uint value)
Parameters
valueuint
Returns
bool2x2(uint, uint, uint, uint)
public static bool2x2 bool2x2(uint m00, uint m01, uint m10, uint m11)
Parameters
Returns
bool2x3(bool2)
public static bool2x3 bool2x3(bool2 value)
Parameters
valuebool2
Returns
bool2x3(bool2, bool2, bool2)
public static bool2x3 bool2x3(bool2 c0, bool2 c1, bool2 c2)
Parameters
Returns
bool2x3(uint)
public static bool2x3 bool2x3(uint value)
Parameters
valueuint
Returns
bool2x3(uint, uint, uint, uint, uint, uint)
public static bool2x3 bool2x3(uint m00, uint m01, uint m02, uint m10, uint m11, uint m12)
Parameters
Returns
bool2x4(bool2)
public static bool2x4 bool2x4(bool2 value)
Parameters
valuebool2
Returns
bool2x4(bool2, bool2, bool2, bool2)
public static bool2x4 bool2x4(bool2 c0, bool2 c1, bool2 c2, bool2 c3)
Parameters
Returns
bool2x4(uint)
public static bool2x4 bool2x4(uint value)
Parameters
valueuint
Returns
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
Returns
bool3(bool2, uint)
public static bool3 bool3(bool2 xy, uint z)
Parameters
Returns
bool3(bool3)
public static bool3 bool3(bool3 xyz)
Parameters
xyzbool3
Returns
bool3(double3)
public static bool3 bool3(double3 v)
Parameters
vdouble3
Returns
bool3(float3)
public static bool3 bool3(float3 v)
Parameters
vfloat3
Returns
bool3(int3)
public static bool3 bool3(int3 v)
Parameters
vint3
Returns
bool3(uint3)
public static bool3 bool3(uint3 v)
Parameters
vuint3
Returns
bool3(uint)
public static bool3 bool3(uint value)
Parameters
valueuint
Returns
bool3(uint, bool2)
public static bool3 bool3(uint x, bool2 yz)
Parameters
Returns
bool3(uint, uint, uint)
public static bool3 bool3(uint x, uint y, uint z)
Parameters
Returns
bool3x2(bool3)
public static bool3x2 bool3x2(bool3 value)
Parameters
valuebool3
Returns
bool3x2(bool3, bool3)
public static bool3x2 bool3x2(bool3 c0, bool3 c1)
Parameters
Returns
bool3x2(uint)
public static bool3x2 bool3x2(uint value)
Parameters
valueuint
Returns
bool3x2(uint, uint, uint, uint, uint, uint)
public static bool3x2 bool3x2(uint m00, uint m01, uint m10, uint m11, uint m20, uint m21)
Parameters
Returns
bool3x3(bool3)
public static bool3x3 bool3x3(bool3 value)
Parameters
valuebool3
Returns
bool3x3(bool3, bool3, bool3)
public static bool3x3 bool3x3(bool3 c0, bool3 c1, bool3 c2)
Parameters
Returns
bool3x3(uint)
public static bool3x3 bool3x3(uint value)
Parameters
valueuint
Returns
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
Returns
bool3x4(bool3)
public static bool3x4 bool3x4(bool3 value)
Parameters
valuebool3
Returns
bool3x4(bool3, bool3, bool3, bool3)
public static bool3x4 bool3x4(bool3 c0, bool3 c1, bool3 c2, bool3 c3)
Parameters
Returns
bool3x4(uint)
public static bool3x4 bool3x4(uint value)
Parameters
valueuint
Returns
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
m00uintm01uintm02uintm03uintm10uintm11uintm12uintm13uintm20uintm21uintm22uintm23uint
Returns
bool4(bool2, bool2)
public static bool4 bool4(bool2 xy, bool2 zw)
Parameters
Returns
bool4(bool2, uint, uint)
public static bool4 bool4(bool2 xy, uint z, uint w)
Parameters
Returns
bool4(bool3, uint)
public static bool4 bool4(bool3 xyz, uint w)
Parameters
Returns
bool4(double4)
public static bool4 bool4(double4 v)
Parameters
vdouble4
Returns
bool4(float4)
public static bool4 bool4(float4 v)
Parameters
vfloat4
Returns
bool4(int4)
public static bool4 bool4(int4 v)
Parameters
vint4
Returns
bool4(uint4)
public static bool4 bool4(uint4 v)
Parameters
vuint4
Returns
bool4(uint)
public static bool4 bool4(uint value)
Parameters
valueuint
Returns
bool4(uint, bool2, uint)
public static bool4 bool4(uint x, bool2 yz, uint w)
Parameters
Returns
bool4(uint, bool3)
public static bool4 bool4(uint x, bool3 yzw)
Parameters
Returns
bool4(uint, uint, bool2)
public static bool4 bool4(uint x, uint y, bool2 zw)
Parameters
Returns
bool4(uint, uint, uint, uint)
public static bool4 bool4(uint x, uint y, uint z, uint w)
Parameters
Returns
bool4x2(bool4)
public static bool4x2 bool4x2(bool4 value)
Parameters
valuebool4
Returns
bool4x2(bool4, bool4)
public static bool4x2 bool4x2(bool4 c0, bool4 c1)
Parameters
Returns
bool4x2(uint)
public static bool4x2 bool4x2(uint value)
Parameters
valueuint
Returns
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
Returns
bool4x3(bool4)
public static bool4x3 bool4x3(bool4 value)
Parameters
valuebool4
Returns
bool4x3(bool4, bool4, bool4)
public static bool4x3 bool4x3(bool4 c0, bool4 c1, bool4 c2)
Parameters
Returns
bool4x3(uint)
public static bool4x3 bool4x3(uint value)
Parameters
valueuint
Returns
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
m00uintm01uintm02uintm10uintm11uintm12uintm20uintm21uintm22uintm30uintm31uintm32uint
Returns
bool4x4(bool4)
public static bool4x4 bool4x4(bool4 value)
Parameters
valuebool4
Returns
bool4x4(bool4, bool4, bool4, bool4)
public static bool4x4 bool4x4(bool4 c0, bool4 c1, bool4 c2, bool4 c3)
Parameters
Returns
bool4x4(uint)
public static bool4x4 bool4x4(uint value)
Parameters
valueuint
Returns
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
m00uintm01uintm02uintm03uintm10uintm11uintm12uintm13uintm20uintm21uintm22uintm23uintm30uintm31uintm32uintm33uint
Returns
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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xint2int2 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
xint3int3 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
xint4int4 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
xuint2uint2 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
xuint3uint3 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
xuint4uint4 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
xintInteger 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
xuintUnsigned 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
xint2Input 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
xint3Input 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
xint4Input 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
xuint2Input 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
xuint3Input 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
xuint4Input 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
xintInput 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
xlongInput 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
xuintInput 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
xulongInput 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
xfloat2The single precision float vector to change the sign.
yfloat2The 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
xfloat3The single precision float vector to change the sign.
yfloat3The 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
xfloat4The single precision float vector to change the sign.
yfloat4The 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
xfloatThe single precision float to change the sign.
yfloatThe 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
valueToClampdouble2Input value to be clamped.
lowerBounddouble2Lower bound of the interval.
upperBounddouble2Upper 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
valueToClampdouble3Input value to be clamped.
lowerBounddouble3Lower bound of the interval.
upperBounddouble3Upper 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
valueToClampdouble4Input value to be clamped.
lowerBounddouble4Lower bound of the interval.
upperBounddouble4Upper 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
valueToClampfloat2Input value to be clamped.
lowerBoundfloat2Lower bound of the interval.
upperBoundfloat2Upper 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
valueToClampfloat3Input value to be clamped.
lowerBoundfloat3Lower bound of the interval.
upperBoundfloat3Upper 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
valueToClampfloat4Input value to be clamped.
lowerBoundfloat4Lower bound of the interval.
upperBoundfloat4Upper 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
valueToClampint2Input value to be clamped.
lowerBoundint2Lower bound of the interval.
upperBoundint2Upper 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
valueToClampint3Input value to be clamped.
lowerBoundint3Lower bound of the interval.
upperBoundint3Upper 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
valueToClampint4Input value to be clamped.
lowerBoundint4Lower bound of the interval.
upperBoundint4Upper 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
valueToClampuint2Input value to be clamped.
lowerBounduint2Lower bound of the interval.
upperBounduint2Upper 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
valueToClampuint3Input value to be clamped.
lowerBounduint3Lower bound of the interval.
upperBounduint3Upper 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
valueToClampuint4Input value to be clamped.
lowerBounduint4Lower bound of the interval.
upperBounduint4Upper 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
valueToClampdoubleInput value to be clamped.
lowerBounddoubleLower bound of the interval.
upperBounddoubleUpper 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
valueToClampintInput value to be clamped.
lowerBoundintLower bound of the interval.
upperBoundintUpper 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
valueToClamplongInput value to be clamped.
lowerBoundlongLower bound of the interval.
upperBoundlongUpper 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
valueToClampfloatInput value to be clamped.
lowerBoundfloatLower bound of the interval.
upperBoundfloatUpper 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
valueToClampuintInput value to be clamped.
lowerBounduintLower bound of the interval.
upperBounduintUpper 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
valueToClampulongInput value to be clamped.
lowerBoundulongLower bound of the interval.
upperBoundulongUpper 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
xdouble2The 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
xdouble3The 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
xdouble4The 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
xfloat2The 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
xfloat3The 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
xfloat4The 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
xint2The 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
xint3The 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
xint4The 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
xuint2The 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
xuint3The 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
xuint4The 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
xdouble2The 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
xdouble3The 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
xdouble4The 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
xfloat2The 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
xfloat3The 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
xfloat4The 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
xint2The 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
xint3The 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
xint4The 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
xuint2The 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
xuint3The 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
xuint4The 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
outputint*Pointer to packed output array where enabled components should be stored to.
indexintIndex into output array where first enabled component should be stored to.
valint4The value to to compress.
maskbool4Mask 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
outputfloat*Pointer to packed output array where enabled components should be stored to.
indexintIndex into output array where first enabled component should be stored to.
valfloat4The value to to compress.
maskbool4Mask 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
outputuint*Pointer to packed output array where enabled components should be stored to.
indexintIndex into output array where first enabled component should be stored to.
valuint4The value to to compress.
maskbool4Mask 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
qquaternionThe 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xint2int2 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
xint3Number 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
xint4Number 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
xuint2Number 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
xuint3Number 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
xuint4Number 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
xintint 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
xlongNumber 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
xuintNumber 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
xulongNumber 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
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
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
xdouble2The 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
xdouble3The 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
xdouble4The 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
xfloat2The 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
xfloat3The 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
xfloat4The 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
xint2The 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
xint3The 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
xint4The 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
xuint2The 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
xuint3The 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
xuint4The 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
xdouble2Vector 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
xdouble3Vector 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
xdouble4Vector 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
xfloat2Vector 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
xfloat3Vector 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
xfloat4Vector 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
xdoubleAngle 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
xfloatAngle in radians.
Returns
- float
Angle converted to degrees.
determinant(double2x2)
public static double determinant(double2x2 value)
Parameters
valuedouble2x2
Returns
determinant(double3x3)
public static double determinant(double3x3 value)
Parameters
valuedouble3x3
Returns
determinant(double4x4)
public static double determinant(double4x4 value)
Parameters
valuedouble4x4
Returns
determinant(float2x2)
public static float determinant(float2x2 value)
Parameters
valuefloat2x2
Returns
determinant(float3x3)
public static float determinant(float3x3 value)
Parameters
valuefloat3x3
Returns
determinant(float4x4)
public static float determinant(float4x4 value)
Parameters
valuefloat4x4
Returns
determinant(int2x2)
public static int determinant(int2x2 value)
Parameters
valueint2x2
Returns
determinant(int3x3)
public static int determinant(int3x3 value)
Parameters
valueint3x3
Returns
determinant(int4x4)
public static int determinant(int4x4 value)
Parameters
valueint4x4
Returns
determinant(uint2x2)
public static uint determinant(uint2x2 value)
Parameters
valueuint2x2
Returns
determinant(uint3x3)
public static uint determinant(uint3x3 value)
Parameters
valueuint3x3
Returns
determinant(uint4x4)
public static uint determinant(uint4x4 value)
Parameters
valueuint4x4
Returns
distance(double2, double2)
Returns the distance between two double2 vectors.
public static double distance(double2 x, double2 y)
Parameters
xdouble2First vector to use in distance computation.
ydouble2Second 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
xdouble3First vector to use in distance computation.
ydouble3Second 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
xdouble4First vector to use in distance computation.
ydouble4Second 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
xfloat2First vector to use in distance computation.
yfloat2Second 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
xfloat3First vector to use in distance computation.
yfloat3Second 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
xfloat4First vector to use in distance computation.
yfloat4Second 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
xdoubleFirst value to use in distance computation.
ydoubleSecond 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
xfloatFirst value to use in distance computation.
yfloatSecond 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
xdouble2First vector to use in distance computation.
ydouble2Second 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
xdouble3First vector to use in distance computation.
ydouble3Second 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
xdouble4First vector to use in distance computation.
ydouble4Second 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
xfloat2First vector to use in distance computation.
yfloat2Second 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
xfloat3First vector to use in distance computation.
yfloat3Second 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
xfloat4First vector to use in distance computation.
yfloat4Second 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
xdoubleFirst value to use in distance computation.
ydoubleSecond 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
xfloatFirst value to use in distance computation.
yfloatSecond 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
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
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
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
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
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
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
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
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
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
aquaternionThe first quaternion.
bquaternionThe 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
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
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
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
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
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
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
Returns
- uint
The dot product of two values.
double2(bool2)
public static double2 double2(bool2 v)
Parameters
vbool2
Returns
double2(double2)
public static double2 double2(double2 xy)
Parameters
xydouble2
Returns
double2(float2)
public static double2 double2(float2 v)
Parameters
vfloat2
Returns
double2(int2)
public static double2 double2(int2 v)
Parameters
vint2
Returns
double2(uint2)
public static double2 double2(uint2 v)
Parameters
vuint2
Returns
double2(double)
public static double2 double2(double value)
Parameters
valuedouble
Returns
double2(double, double)
public static double2 double2(double x, double y)
Parameters
Returns
double2(int)
public static double2 double2(int v)
Parameters
vint
Returns
double2(float)
public static double2 double2(float v)
Parameters
vfloat
Returns
double2(uint)
public static double2 double2(uint v)
Parameters
vuint
Returns
double2x2(double2)
public static double2x2 double2x2(double2 value)
Parameters
valuedouble2
Returns
double2x2(double2, double2)
public static double2x2 double2x2(double2 c0, double2 c1)
Parameters
Returns
double2x2(double)
public static double2x2 double2x2(double value)
Parameters
valuedouble
Returns
double2x2(double, double, double, double)
public static double2x2 double2x2(double m00, double m01, double m10, double m11)
Parameters
Returns
double2x3(double2)
public static double2x3 double2x3(double2 value)
Parameters
valuedouble2
Returns
double2x3(double2, double2, double2)
public static double2x3 double2x3(double2 c0, double2 c1, double2 c2)
Parameters
Returns
double2x3(double)
public static double2x3 double2x3(double value)
Parameters
valuedouble
Returns
double2x3(double, double, double, double, double, double)
public static double2x3 double2x3(double m00, double m01, double m02, double m10, double m11, double m12)
Parameters
Returns
double2x4(double2)
public static double2x4 double2x4(double2 value)
Parameters
valuedouble2
Returns
double2x4(double2, double2, double2, double2)
public static double2x4 double2x4(double2 c0, double2 c1, double2 c2, double2 c3)
Parameters
Returns
double2x4(double)
public static double2x4 double2x4(double value)
Parameters
valuedouble
Returns
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
Returns
double3(bool3)
public static double3 double3(bool3 v)
Parameters
vbool3
Returns
double3(double2, double)
public static double3 double3(double2 xy, double z)
Parameters
Returns
double3(double3)
public static double3 double3(double3 xyz)
Parameters
xyzdouble3
Returns
double3(float3)
public static double3 double3(float3 v)
Parameters
vfloat3
Returns
double3(int3)
public static double3 double3(int3 v)
Parameters
vint3
Returns
double3(uint3)
public static double3 double3(uint3 v)
Parameters
vuint3
Returns
double3(double)
public static double3 double3(double value)
Parameters
valuedouble
Returns
double3(double, double2)
public static double3 double3(double x, double2 yz)
Parameters
Returns
double3(double, double, double)
public static double3 double3(double x, double y, double z)
Parameters
Returns
double3(int)
public static double3 double3(int v)
Parameters
vint
Returns
double3(float)
public static double3 double3(float v)
Parameters
vfloat
Returns
double3(uint)
public static double3 double3(uint v)
Parameters
vuint
Returns
double3x2(double3)
public static double3x2 double3x2(double3 value)
Parameters
valuedouble3
Returns
double3x2(double3, double3)
public static double3x2 double3x2(double3 c0, double3 c1)
Parameters
Returns
double3x2(double)
public static double3x2 double3x2(double value)
Parameters
valuedouble
Returns
double3x2(double, double, double, double, double, double)
public static double3x2 double3x2(double m00, double m01, double m10, double m11, double m20, double m21)
Parameters
Returns
double3x3(double3)
public static double3x3 double3x3(double3 value)
Parameters
valuedouble3
Returns
double3x3(double3, double3, double3)
public static double3x3 double3x3(double3 c0, double3 c1, double3 c2)
Parameters
Returns
double3x3(double)
public static double3x3 double3x3(double value)
Parameters
valuedouble
Returns
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
Returns
double3x4(double3)
public static double3x4 double3x4(double3 value)
Parameters
valuedouble3
Returns
double3x4(double3, double3, double3, double3)
public static double3x4 double3x4(double3 c0, double3 c1, double3 c2, double3 c3)
Parameters
Returns
double3x4(double)
public static double3x4 double3x4(double value)
Parameters
valuedouble
Returns
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
m00doublem01doublem02doublem03doublem10doublem11doublem12doublem13doublem20doublem21doublem22doublem23double
Returns
double4(bool4)
public static double4 double4(bool4 v)
Parameters
vbool4
Returns
double4(double2, double2)
public static double4 double4(double2 xy, double2 zw)
Parameters
Returns
double4(double2, double, double)
public static double4 double4(double2 xy, double z, double w)
Parameters
Returns
double4(double3, double)
public static double4 double4(double3 xyz, double w)
Parameters
Returns
double4(float4)
public static double4 double4(float4 v)
Parameters
vfloat4
Returns
double4(int4)
public static double4 double4(int4 v)
Parameters
vint4
Returns
double4(uint4)
public static double4 double4(uint4 v)
Parameters
vuint4
Returns
double4(double)
public static double4 double4(double value)
Parameters
valuedouble
Returns
double4(double, double2, double)
public static double4 double4(double x, double2 yz, double w)
Parameters
Returns
double4(double, double3)
public static double4 double4(double x, double3 yzw)
Parameters
Returns
double4(double, double, double2)
public static double4 double4(double x, double y, double2 zw)
Parameters
Returns
double4(double, double, double, double)
public static double4 double4(double x, double y, double z, double w)
Parameters
Returns
double4(int)
public static double4 double4(int v)
Parameters
vint
Returns
double4(float)
public static double4 double4(float v)
Parameters
vfloat
Returns
double4(uint)
public static double4 double4(uint v)
Parameters
vuint
Returns
double4x2(double4)
public static double4x2 double4x2(double4 value)
Parameters
valuedouble4
Returns
double4x2(double4, double4)
public static double4x2 double4x2(double4 c0, double4 c1)
Parameters
Returns
double4x2(double)
public static double4x2 double4x2(double value)
Parameters
valuedouble
Returns
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
Returns
double4x3(double4)
public static double4x3 double4x3(double4 value)
Parameters
valuedouble4
Returns
double4x3(double4, double4, double4)
public static double4x3 double4x3(double4 c0, double4 c1, double4 c2)
Parameters
Returns
double4x3(double)
public static double4x3 double4x3(double value)
Parameters
valuedouble
Returns
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
m00doublem01doublem02doublem10doublem11doublem12doublem20doublem21doublem22doublem30doublem31doublem32double
Returns
double4x4(double4)
public static double4x4 double4x4(double4 value)
Parameters
valuedouble4
Returns
double4x4(double4, double4, double4, double4)
public static double4x4 double4x4(double4 c0, double4 c1, double4 c2, double4 c3)
Parameters
Returns
double4x4(double)
public static double4x4 double4x4(double value)
Parameters
valuedouble
Returns
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
m00doublem01doublem02doublem03doublem10doublem11doublem12doublem13doublem20doublem21doublem22doublem23doublem30doublem31doublem32doublem33double
Returns
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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
qquaternionThe 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
xdoubleInput 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
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
ndouble2Vector to conditionally flip.
idouble2First vector in direction comparison.
ngdouble2Second 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
ndouble3Vector to conditionally flip.
idouble3First vector in direction comparison.
ngdouble3Second 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
ndouble4Vector to conditionally flip.
idouble4First vector in direction comparison.
ngdouble4Second 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
nfloat2Vector to conditionally flip.
ifloat2First vector in direction comparison.
ngfloat2Second 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
nfloat3Vector to conditionally flip.
ifloat3First vector in direction comparison.
ngfloat3Second 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
nfloat4Vector to conditionally flip.
ifloat4First vector in direction comparison.
ngfloat4Second 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
Returns
fastinverse(float4x4)
public static float4x4 fastinverse(float4x4 m)
Parameters
mfloat4x4
Returns
float2(bool2)
public static float2 float2(bool2 v)
Parameters
vbool2
Returns
float2(double2)
public static float2 float2(double2 v)
Parameters
vdouble2
Returns
float2(float2)
public static float2 float2(float2 xy)
Parameters
xyfloat2
Returns
float2(int2)
public static float2 float2(int2 v)
Parameters
vint2
Returns
float2(uint2)
public static float2 float2(uint2 v)
Parameters
vuint2
Returns
float2(double)
public static float2 float2(double v)
Parameters
vdouble
Returns
float2(int)
public static float2 float2(int v)
Parameters
vint
Returns
float2(float)
public static float2 float2(float value)
Parameters
valuefloat
Returns
float2(float, float)
public static float2 float2(float x, float y)
Parameters
Returns
float2(uint)
public static float2 float2(uint v)
Parameters
vuint
Returns
float2x2(double2x2)
public static float2x2 float2x2(double2x2 v)
Parameters
Returns
float2x2(float2)
public static float2x2 float2x2(float2 value)
Parameters
valuefloat2
Returns
float2x2(float2, float2)
public static float2x2 float2x2(float2 c0, float2 c1)
Parameters
Returns
float2x2(int2x2)
public static float2x2 float2x2(int2x2 v)
Parameters
vint2x2
Returns
float2x2(uint2x2)
public static float2x2 float2x2(uint2x2 v)
Parameters
vuint2x2
Returns
float2x2(float)
public static float2x2 float2x2(float value)
Parameters
valuefloat
Returns
float2x2(float, float, float, float)
public static float2x2 float2x2(float m00, float m01, float m10, float m11)
Parameters
Returns
float2x3(double2x3)
public static float2x3 float2x3(double2x3 v)
Parameters
Returns
float2x3(float2)
public static float2x3 float2x3(float2 value)
Parameters
valuefloat2
Returns
float2x3(float2, float2, float2)
public static float2x3 float2x3(float2 c0, float2 c1, float2 c2)
Parameters
Returns
float2x3(int2x3)
public static float2x3 float2x3(int2x3 v)
Parameters
vint2x3
Returns
float2x3(uint2x3)
public static float2x3 float2x3(uint2x3 v)
Parameters
vuint2x3
Returns
float2x3(float)
public static float2x3 float2x3(float value)
Parameters
valuefloat
Returns
float2x3(float, float, float, float, float, float)
public static float2x3 float2x3(float m00, float m01, float m02, float m10, float m11, float m12)
Parameters
Returns
float2x4(double2x4)
public static float2x4 float2x4(double2x4 v)
Parameters
Returns
float2x4(float2)
public static float2x4 float2x4(float2 value)
Parameters
valuefloat2
Returns
float2x4(float2, float2, float2, float2)
public static float2x4 float2x4(float2 c0, float2 c1, float2 c2, float2 c3)
Parameters
Returns
float2x4(int2x4)
public static float2x4 float2x4(int2x4 v)
Parameters
vint2x4
Returns
float2x4(uint2x4)
public static float2x4 float2x4(uint2x4 v)
Parameters
vuint2x4
Returns
float2x4(float)
public static float2x4 float2x4(float value)
Parameters
valuefloat
Returns
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
Returns
float3(bool3)
public static float3 float3(bool3 v)
Parameters
vbool3
Returns
float3(double3)
public static float3 float3(double3 v)
Parameters
vdouble3
Returns
float3(float2, float)
public static float3 float3(float2 xy, float z)
Parameters
Returns
float3(float3)
public static float3 float3(float3 xyz)
Parameters
xyzfloat3
Returns
float3(int3)
public static float3 float3(int3 v)
Parameters
vint3
Returns
float3(uint3)
public static float3 float3(uint3 v)
Parameters
vuint3
Returns
float3(double)
public static float3 float3(double v)
Parameters
vdouble
Returns
float3(int)
public static float3 float3(int v)
Parameters
vint
Returns
float3(float)
public static float3 float3(float value)
Parameters
valuefloat
Returns
float3(float, float2)
public static float3 float3(float x, float2 yz)
Parameters
Returns
float3(float, float, float)
public static float3 float3(float x, float y, float z)
Parameters
Returns
float3(uint)
public static float3 float3(uint v)
Parameters
vuint
Returns
float3x2(double3x2)
public static float3x2 float3x2(double3x2 v)
Parameters
Returns
float3x2(float3)
public static float3x2 float3x2(float3 value)
Parameters
valuefloat3
Returns
float3x2(float3, float3)
public static float3x2 float3x2(float3 c0, float3 c1)
Parameters
Returns
float3x2(int3x2)
public static float3x2 float3x2(int3x2 v)
Parameters
vint3x2
Returns
float3x2(uint3x2)
public static float3x2 float3x2(uint3x2 v)
Parameters
vuint3x2
Returns
float3x2(float)
public static float3x2 float3x2(float value)
Parameters
valuefloat
Returns
float3x2(float, float, float, float, float, float)
public static float3x2 float3x2(float m00, float m01, float m10, float m11, float m20, float m21)
Parameters
Returns
float3x3(double3x3)
public static float3x3 float3x3(double3x3 v)
Parameters
Returns
float3x3(float3)
public static float3x3 float3x3(float3 value)
Parameters
valuefloat3
Returns
float3x3(float3, float3, float3)
public static float3x3 float3x3(float3 c0, float3 c1, float3 c2)
Parameters
Returns
float3x3(int3x3)
public static float3x3 float3x3(int3x3 v)
Parameters
vint3x3
Returns
float3x3(uint3x3)
public static float3x3 float3x3(uint3x3 v)
Parameters
vuint3x3
Returns
float3x3(float)
public static float3x3 float3x3(float value)
Parameters
valuefloat
Returns
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
Returns
float3x4(double3x4)
public static float3x4 float3x4(double3x4 v)
Parameters
Returns
float3x4(float3)
public static float3x4 float3x4(float3 value)
Parameters
valuefloat3
Returns
float3x4(float3, float3, float3, float3)
public static float3x4 float3x4(float3 c0, float3 c1, float3 c2, float3 c3)
Parameters
Returns
float3x4(int3x4)
public static float3x4 float3x4(int3x4 v)
Parameters
vint3x4
Returns
float3x4(uint3x4)
public static float3x4 float3x4(uint3x4 v)
Parameters
vuint3x4
Returns
float3x4(float)
public static float3x4 float3x4(float value)
Parameters
valuefloat
Returns
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
m00floatm01floatm02floatm03floatm10floatm11floatm12floatm13floatm20floatm21floatm22floatm23float
Returns
float4(bool4)
public static float4 float4(bool4 v)
Parameters
vbool4
Returns
float4(double4)
public static float4 float4(double4 v)
Parameters
vdouble4
Returns
float4(float2, float2)
public static float4 float4(float2 xy, float2 zw)
Parameters
Returns
float4(float2, float, float)
public static float4 float4(float2 xy, float z, float w)
Parameters
Returns
float4(float3, float)
public static float4 float4(float3 xyz, float w)
Parameters
Returns
float4(int4)
public static float4 float4(int4 v)
Parameters
vint4
Returns
float4(uint4)
public static float4 float4(uint4 v)
Parameters
vuint4
Returns
float4(double)
public static float4 float4(double v)
Parameters
vdouble
Returns
float4(int)
public static float4 float4(int v)
Parameters
vint
Returns
float4(float)
public static float4 float4(float value)
Parameters
valuefloat
Returns
float4(float, float2, float)
public static float4 float4(float x, float2 yz, float w)
Parameters
Returns
float4(float, float3)
public static float4 float4(float x, float3 yzw)
Parameters
Returns
float4(float, float, float2)
public static float4 float4(float x, float y, float2 zw)
Parameters
Returns
float4(float, float, float, float)
public static float4 float4(float x, float y, float z, float w)
Parameters
Returns
float4(uint)
public static float4 float4(uint v)
Parameters
vuint
Returns
float4x2(double4x2)
public static float4x2 float4x2(double4x2 v)
Parameters
Returns
float4x2(float4)
public static float4x2 float4x2(float4 value)
Parameters
valuefloat4
Returns
float4x2(float4, float4)
public static float4x2 float4x2(float4 c0, float4 c1)
Parameters
Returns
float4x2(int4x2)
public static float4x2 float4x2(int4x2 v)
Parameters
vint4x2
Returns
float4x2(uint4x2)
public static float4x2 float4x2(uint4x2 v)
Parameters
vuint4x2
Returns
float4x2(float)
public static float4x2 float4x2(float value)
Parameters
valuefloat
Returns
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
Returns
float4x3(double4x3)
public static float4x3 float4x3(double4x3 v)
Parameters
Returns
float4x3(float4)
public static float4x3 float4x3(float4 value)
Parameters
valuefloat4
Returns
float4x3(float4, float4, float4)
public static float4x3 float4x3(float4 c0, float4 c1, float4 c2)
Parameters
Returns
float4x3(int4x3)
public static float4x3 float4x3(int4x3 v)
Parameters
vint4x3
Returns
float4x3(uint4x3)
public static float4x3 float4x3(uint4x3 v)
Parameters
vuint4x3
Returns
float4x3(float)
public static float4x3 float4x3(float value)
Parameters
valuefloat
Returns
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
m00floatm01floatm02floatm10floatm11floatm12floatm20floatm21floatm22floatm30floatm31floatm32float
Returns
float4x4(double4x4)
public static float4x4 float4x4(double4x4 v)
Parameters
Returns
float4x4(float4)
public static float4x4 float4x4(float4 value)
Parameters
valuefloat4
Returns
float4x4(float4, float4, float4, float4)
public static float4x4 float4x4(float4 c0, float4 c1, float4 c2, float4 c3)
Parameters
Returns
float4x4(int4x4)
public static float4x4 float4x4(int4x4 v)
Parameters
vint4x4
Returns
float4x4(uint4x4)
public static float4x4 float4x4(uint4x4 v)
Parameters
vuint4x4
Returns
float4x4(float)
public static float4x4 float4x4(float value)
Parameters
valuefloat
Returns
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
m00floatm01floatm02floatm03floatm10floatm11floatm12floatm13floatm20floatm21floatm22floatm23floatm30floatm31floatm32floatm33float
Returns
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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xint2int2 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
xint3int3 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
xint4int4 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
xuint2uint2 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
xuint3uint3 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
xuint4uint4 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
xintInteger 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
xuintUnsigned 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
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
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
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
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
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
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
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
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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
qquaternionThe 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
pBuffervoid*A pointer to the beginning of the data.
numBytesintNumber of bytes to hash.
seeduintStarting 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
qquaternionThe quaternion to hash.
Returns
- uint4
The uint4 vector hash code of the input quaternion.
int2(bool2)
public static int2 int2(bool2 v)
Parameters
vbool2
Returns
int2(double2)
public static int2 int2(double2 v)
Parameters
vdouble2
Returns
int2(float2)
public static int2 int2(float2 v)
Parameters
vfloat2
Returns
int2(int2)
public static int2 int2(int2 xy)
Parameters
xyint2
Returns
int2(uint2)
public static int2 int2(uint2 v)
Parameters
vuint2
Returns
int2(double)
public static int2 int2(double v)
Parameters
vdouble
Returns
int2(int)
public static int2 int2(int value)
Parameters
valueint
Returns
int2(int, int)
public static int2 int2(int x, int y)
Parameters
Returns
int2(float)
public static int2 int2(float v)
Parameters
vfloat
Returns
int2(uint)
public static int2 int2(uint v)
Parameters
vuint
Returns
int2x2(int2)
public static int2x2 int2x2(int2 value)
Parameters
valueint2
Returns
int2x2(int2, int2)
public static int2x2 int2x2(int2 c0, int2 c1)
Parameters
Returns
int2x2(int)
public static int2x2 int2x2(int value)
Parameters
valueint
Returns
int2x2(int, int, int, int)
public static int2x2 int2x2(int m00, int m01, int m10, int m11)
Parameters
Returns
int2x3(int2)
public static int2x3 int2x3(int2 value)
Parameters
valueint2
Returns
int2x3(int2, int2, int2)
public static int2x3 int2x3(int2 c0, int2 c1, int2 c2)
Parameters
Returns
int2x3(int)
public static int2x3 int2x3(int value)
Parameters
valueint
Returns
int2x3(int, int, int, int, int, int)
public static int2x3 int2x3(int m00, int m01, int m02, int m10, int m11, int m12)
Parameters
Returns
int2x4(int2)
public static int2x4 int2x4(int2 value)
Parameters
valueint2
Returns
int2x4(int2, int2, int2, int2)
public static int2x4 int2x4(int2 c0, int2 c1, int2 c2, int2 c3)
Parameters
Returns
int2x4(int)
public static int2x4 int2x4(int value)
Parameters
valueint
Returns
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
Returns
int3(bool3)
public static int3 int3(bool3 v)
Parameters
vbool3
Returns
int3(double3)
public static int3 int3(double3 v)
Parameters
vdouble3
Returns
int3(float3)
public static int3 int3(float3 v)
Parameters
vfloat3
Returns
int3(int2, int)
public static int3 int3(int2 xy, int z)
Parameters
Returns
int3(int3)
public static int3 int3(int3 xyz)
Parameters
xyzint3
Returns
int3(uint3)
public static int3 int3(uint3 v)
Parameters
vuint3
Returns
int3(double)
public static int3 int3(double v)
Parameters
vdouble
Returns
int3(int)
public static int3 int3(int value)
Parameters
valueint
Returns
int3(int, int2)
public static int3 int3(int x, int2 yz)
Parameters
Returns
int3(int, int, int)
public static int3 int3(int x, int y, int z)
Parameters
Returns
int3(float)
public static int3 int3(float v)
Parameters
vfloat
Returns
int3(uint)
public static int3 int3(uint v)
Parameters
vuint
Returns
int3x2(int3)
public static int3x2 int3x2(int3 value)
Parameters
valueint3
Returns
int3x2(int3, int3)
public static int3x2 int3x2(int3 c0, int3 c1)
Parameters
Returns
int3x2(int)
public static int3x2 int3x2(int value)
Parameters
valueint
Returns
int3x2(int, int, int, int, int, int)
public static int3x2 int3x2(int m00, int m01, int m10, int m11, int m20, int m21)
Parameters
Returns
int3x3(int3)
public static int3x3 int3x3(int3 value)
Parameters
valueint3
Returns
int3x3(int3, int3, int3)
public static int3x3 int3x3(int3 c0, int3 c1, int3 c2)
Parameters
Returns
int3x3(int)
public static int3x3 int3x3(int value)
Parameters
valueint
Returns
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
Returns
int3x4(int3)
public static int3x4 int3x4(int3 value)
Parameters
valueint3
Returns
int3x4(int3, int3, int3, int3)
public static int3x4 int3x4(int3 c0, int3 c1, int3 c2, int3 c3)
Parameters
Returns
int3x4(int)
public static int3x4 int3x4(int value)
Parameters
valueint
Returns
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
Returns
int4(bool4)
public static int4 int4(bool4 v)
Parameters
vbool4
Returns
int4(double4)
public static int4 int4(double4 v)
Parameters
vdouble4
Returns
int4(float4)
public static int4 int4(float4 v)
Parameters
vfloat4
Returns
int4(int2, int2)
public static int4 int4(int2 xy, int2 zw)
Parameters
Returns
int4(int2, int, int)
public static int4 int4(int2 xy, int z, int w)
Parameters
Returns
int4(int3, int)
public static int4 int4(int3 xyz, int w)
Parameters
Returns
int4(uint4)
public static int4 int4(uint4 v)
Parameters
vuint4
Returns
int4(double)
public static int4 int4(double v)
Parameters
vdouble
Returns
int4(int)
public static int4 int4(int value)
Parameters
valueint
Returns
int4(int, int2, int)
public static int4 int4(int x, int2 yz, int w)
Parameters
Returns
int4(int, int3)
public static int4 int4(int x, int3 yzw)
Parameters
Returns
int4(int, int, int2)
public static int4 int4(int x, int y, int2 zw)
Parameters
Returns
int4(int, int, int, int)
public static int4 int4(int x, int y, int z, int w)
Parameters
Returns
int4(float)
public static int4 int4(float v)
Parameters
vfloat
Returns
int4(uint)
public static int4 int4(uint v)
Parameters
vuint
Returns
int4x2(int4)
public static int4x2 int4x2(int4 value)
Parameters
valueint4
Returns
int4x2(int4, int4)
public static int4x2 int4x2(int4 c0, int4 c1)
Parameters
Returns
int4x2(int)
public static int4x2 int4x2(int value)
Parameters
valueint
Returns
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
Returns
int4x3(int4)
public static int4x3 int4x3(int4 value)
Parameters
valueint4
Returns
int4x3(int4, int4, int4)
public static int4x3 int4x3(int4 c0, int4 c1, int4 c2)
Parameters
Returns
int4x3(int)
public static int4x3 int4x3(int value)
Parameters
valueint
Returns
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
Returns
int4x4(int4)
public static int4x4 int4x4(int4 value)
Parameters
valueint4
Returns
int4x4(int4, int4, int4, int4)
public static int4x4 int4x4(int4 c0, int4 c1, int4 c2, int4 c3)
Parameters
Returns
int4x4(int)
public static int4x4 int4x4(int value)
Parameters
valueint
Returns
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
m00intm01intm02intm03intm10intm11intm12intm13intm20intm21intm22intm23intm30intm31intm32intm33int
Returns
inverse(double2x2)
public static double2x2 inverse(double2x2 value)
Parameters
valuedouble2x2
Returns
inverse(double3x3)
public static double3x3 inverse(double3x3 value)
Parameters
valuedouble3x3
Returns
inverse(double4x4)
public static double4x4 inverse(double4x4 value)
Parameters
valuedouble4x4
Returns
inverse(float2x2)
public static float2x2 inverse(float2x2 value)
Parameters
valuefloat2x2
Returns
inverse(float3x3)
public static float3x3 inverse(float3x3 value)
Parameters
valuefloat3x3
Returns
inverse(float4x4)
public static float4x4 inverse(float4x4 value)
Parameters
valuefloat4x4
Returns
inverse(quaternion)
Returns the inverse of a quaternion value.
public static quaternion inverse(quaternion q)
Parameters
qquaternionThe 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
xdouble2The 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
xdouble3The 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
xdouble4The 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
xfloat2The 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
xfloat3The 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
xfloat4The 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
xdoubleThe 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
xfloatThe 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xint2int2 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
xint3int3 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
xint4int4 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
xuint2uint2 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
xuint3uint3 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
xuint4uint4 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
xintInteger 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
xuintUnsigned 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
xdouble2Vector 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
xdouble3Vector 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
xdouble4Vector 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
xfloat2Vector 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
xfloat3Vector 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
xfloat4Vector 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
qquaternionThe 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
xdoubleValue 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
xfloatValue 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
xdouble2Vector 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
xdouble3Vector 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
xdouble4Vector 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
xfloat2Vector 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
xfloat3Vector 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
xfloat4Vector 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
qquaternionThe 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
xdoubleValue 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
xfloatValue 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
startdouble2The start point, corresponding to the interpolation parameter value of 0.
enddouble2The end point, corresponding to the interpolation parameter value of 1.
tdouble2The 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
startdouble2The start point, corresponding to the interpolation parameter value of 0.
enddouble2The end point, corresponding to the interpolation parameter value of 1.
tdoubleThe 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
startdouble3The start point, corresponding to the interpolation parameter value of 0.
enddouble3The end point, corresponding to the interpolation parameter value of 1.
tdouble3The 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
startdouble3The start point, corresponding to the interpolation parameter value of 0.
enddouble3The end point, corresponding to the interpolation parameter value of 1.
tdoubleThe 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
startdouble4The start point, corresponding to the interpolation parameter value of 0.
enddouble4The end point, corresponding to the interpolation parameter value of 1.
tdouble4The 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
startdouble4The start point, corresponding to the interpolation parameter value of 0.
enddouble4The end point, corresponding to the interpolation parameter value of 1.
tdoubleThe 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
startfloat2The start point, corresponding to the interpolation parameter value of 0.
endfloat2The end point, corresponding to the interpolation parameter value of 1.
tfloat2The 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
startfloat2The start point, corresponding to the interpolation parameter value of 0.
endfloat2The end point, corresponding to the interpolation parameter value of 1.
tfloatThe 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
startfloat3The start point, corresponding to the interpolation parameter value of 0.
endfloat3The end point, corresponding to the interpolation parameter value of 1.
tfloat3The 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
startfloat3The start point, corresponding to the interpolation parameter value of 0.
endfloat3The end point, corresponding to the interpolation parameter value of 1.
tfloatThe 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
startfloat4The start point, corresponding to the interpolation parameter value of 0.
endfloat4The end point, corresponding to the interpolation parameter value of 1.
tfloat4The 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
startfloat4The start point, corresponding to the interpolation parameter value of 0.
endfloat4The end point, corresponding to the interpolation parameter value of 1.
tfloatThe 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
startdoubleThe start point, corresponding to the interpolation parameter value of 0.
enddoubleThe end point, corresponding to the interpolation parameter value of 1.
tdoubleThe 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
startfloatThe start point, corresponding to the interpolation parameter value of 0.
endfloatThe end point, corresponding to the interpolation parameter value of 1.
tfloatThe 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
qquaternionThe 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
xdoubleInput 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
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xint2Input 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
xint3Input 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
xint4Input 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
xuint2Input 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
xuint3Input 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
xuint4Input 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
xintInput 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
xlongInput 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
xuintInput 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
xulongInput 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
mulAdouble2First value to multiply.
mulBdouble2Second value to multiply.
addCdouble2Third 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
mulAdouble3First value to multiply.
mulBdouble3Second value to multiply.
addCdouble3Third 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
mulAdouble4First value to multiply.
mulBdouble4Second value to multiply.
addCdouble4Third 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
mulAfloat2First value to multiply.
mulBfloat2Second value to multiply.
addCfloat2Third 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
mulAfloat3First value to multiply.
mulBfloat3Second value to multiply.
addCfloat3Third 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
mulAfloat4First value to multiply.
mulBfloat4Second value to multiply.
addCfloat4Third 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
mulAint2First value to multiply.
mulBint2Second value to multiply.
addCint2Third 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
mulAint3First value to multiply.
mulBint3Second value to multiply.
addCint3Third 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
mulAint4First value to multiply.
mulBint4Second value to multiply.
addCint4Third 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
mulAuint2First value to multiply.
mulBuint2Second value to multiply.
addCuint2Third 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
mulAuint3First value to multiply.
mulBuint3Second value to multiply.
addCuint3Third 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
mulAuint4First value to multiply.
mulBuint4Second value to multiply.
addCuint4Third 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
mulAdoubleFirst value to multiply.
mulBdoubleSecond value to multiply.
addCdoubleThird 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
mulAintFirst value to multiply.
mulBintSecond value to multiply.
addCintThird 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
mulAlongFirst value to multiply.
mulBlongSecond value to multiply.
addClongThird 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
mulAfloatFirst value to multiply.
mulBfloatSecond value to multiply.
addCfloatThird 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
mulAuintFirst value to multiply.
mulBuintSecond value to multiply.
addCuintThird 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
mulAulongFirst value to multiply.
mulBulongSecond value to multiply.
addCulongThird 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
xdouble2Value to split into integral and fractional part.
idouble2Output 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
xdouble3Value to split into integral and fractional part.
idouble3Output 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
xdouble4Value to split into integral and fractional part.
idouble4Output 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
xfloat2Value to split into integral and fractional part.
ifloat2Output 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
xfloat3Value to split into integral and fractional part.
ifloat3Output 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
xfloat4Value to split into integral and fractional part.
ifloat4Output 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
xdoubleValue to split into integral and fractional part.
idoubleOutput 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
xfloatValue to split into integral and fractional part.
ifloatOutput 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
Returns
mul(double2, double2x3)
public static double3 mul(double2 v, double2x3 m)
Parameters
Returns
mul(double2, double2x4)
public static double4 mul(double2 v, double2x4 m)
Parameters
Returns
mul(double2x2, double2)
public static double2 mul(double2x2 m, double2 v)
Parameters
Returns
mul(double2x2, double2x2)
public static double2x2 mul(double2x2 lhs, double2x2 rhs)
Parameters
Returns
mul(double2x2, double2x3)
public static double2x3 mul(double2x2 lhs, double2x3 rhs)
Parameters
Returns
mul(double2x2, double2x4)
public static double2x4 mul(double2x2 lhs, double2x4 rhs)
Parameters
Returns
mul(double2x3, double3)
public static double2 mul(double2x3 m, double3 v)
Parameters
Returns
mul(double2x3, double3x2)
public static double2x2 mul(double2x3 lhs, double3x2 rhs)
Parameters
Returns
mul(double2x3, double3x3)
public static double2x3 mul(double2x3 lhs, double3x3 rhs)
Parameters
Returns
mul(double2x3, double3x4)
public static double2x4 mul(double2x3 lhs, double3x4 rhs)
Parameters
Returns
mul(double2x4, double4)
public static double2 mul(double2x4 m, double4 v)
Parameters
Returns
mul(double2x4, double4x2)
public static double2x2 mul(double2x4 lhs, double4x2 rhs)
Parameters
Returns
mul(double2x4, double4x3)
public static double2x3 mul(double2x4 lhs, double4x3 rhs)
Parameters
Returns
mul(double2x4, double4x4)
public static double2x4 mul(double2x4 lhs, double4x4 rhs)
Parameters
Returns
mul(double3, double3x2)
public static double2 mul(double3 v, double3x2 m)
Parameters
Returns
mul(double3, double3x3)
public static double3 mul(double3 v, double3x3 m)
Parameters
Returns
mul(double3, double3x4)
public static double4 mul(double3 v, double3x4 m)
Parameters
Returns
mul(double3x2, double2)
public static double3 mul(double3x2 m, double2 v)
Parameters
Returns
mul(double3x2, double2x2)
public static double3x2 mul(double3x2 lhs, double2x2 rhs)
Parameters
Returns
mul(double3x2, double2x3)
public static double3x3 mul(double3x2 lhs, double2x3 rhs)
Parameters
Returns
mul(double3x2, double2x4)
public static double3x4 mul(double3x2 lhs, double2x4 rhs)
Parameters
Returns
mul(double3x3, double3)
public static double3 mul(double3x3 m, double3 v)
Parameters
Returns
mul(double3x3, double3x2)
public static double3x2 mul(double3x3 lhs, double3x2 rhs)
Parameters
Returns
mul(double3x3, double3x3)
public static double3x3 mul(double3x3 lhs, double3x3 rhs)
Parameters
Returns
mul(double3x3, double3x4)
public static double3x4 mul(double3x3 lhs, double3x4 rhs)
Parameters
Returns
mul(double3x4, double4)
public static double3 mul(double3x4 m, double4 v)
Parameters
Returns
mul(double3x4, double4x2)
public static double3x2 mul(double3x4 lhs, double4x2 rhs)
Parameters
Returns
mul(double3x4, double4x3)
public static double3x3 mul(double3x4 lhs, double4x3 rhs)
Parameters
Returns
mul(double3x4, double4x4)
public static double3x4 mul(double3x4 lhs, double4x4 rhs)
Parameters
Returns
mul(double4, double4x2)
public static double2 mul(double4 v, double4x2 m)
Parameters
Returns
mul(double4, double4x3)
public static double3 mul(double4 v, double4x3 m)
Parameters
Returns
mul(double4, double4x4)
public static double4 mul(double4 v, double4x4 m)
Parameters
Returns
mul(double4x2, double2)
public static double4 mul(double4x2 m, double2 v)
Parameters
Returns
mul(double4x2, double2x2)
public static double4x2 mul(double4x2 lhs, double2x2 rhs)
Parameters
Returns
mul(double4x2, double2x3)
public static double4x3 mul(double4x2 lhs, double2x3 rhs)
Parameters
Returns
mul(double4x2, double2x4)
public static double4x4 mul(double4x2 lhs, double2x4 rhs)
Parameters
Returns
mul(double4x3, double3)
public static double4 mul(double4x3 m, double3 v)
Parameters
Returns
mul(double4x3, double3x2)
public static double4x2 mul(double4x3 lhs, double3x2 rhs)
Parameters
Returns
mul(double4x3, double3x3)
public static double4x3 mul(double4x3 lhs, double3x3 rhs)
Parameters
Returns
mul(double4x3, double3x4)
public static double4x4 mul(double4x3 lhs, double3x4 rhs)
Parameters
Returns
mul(double4x4, double4)
public static double4 mul(double4x4 m, double4 v)
Parameters
Returns
mul(double4x4, double4x2)
public static double4x2 mul(double4x4 lhs, double4x2 rhs)
Parameters
Returns
mul(double4x4, double4x3)
public static double4x3 mul(double4x4 lhs, double4x3 rhs)
Parameters
Returns
mul(double4x4, double4x4)
public static double4x4 mul(double4x4 lhs, double4x4 rhs)
Parameters
Returns
mul(float2, float2x2)
public static float2 mul(float2 v, float2x2 m)
Parameters
Returns
mul(float2, float2x3)
public static float3 mul(float2 v, float2x3 m)
Parameters
Returns
mul(float2, float2x4)
public static float4 mul(float2 v, float2x4 m)
Parameters
Returns
mul(float2x2, float2)
public static float2 mul(float2x2 m, float2 v)
Parameters
Returns
mul(float2x2, float2x2)
public static float2x2 mul(float2x2 lhs, float2x2 rhs)
Parameters
Returns
mul(float2x2, float2x3)
public static float2x3 mul(float2x2 lhs, float2x3 rhs)
Parameters
Returns
mul(float2x2, float2x4)
public static float2x4 mul(float2x2 lhs, float2x4 rhs)
Parameters
Returns
mul(float2x3, float3)
public static float2 mul(float2x3 m, float3 v)
Parameters
Returns
mul(float2x3, float3x2)
public static float2x2 mul(float2x3 lhs, float3x2 rhs)
Parameters
Returns
mul(float2x3, float3x3)
public static float2x3 mul(float2x3 lhs, float3x3 rhs)
Parameters
Returns
mul(float2x3, float3x4)
public static float2x4 mul(float2x3 lhs, float3x4 rhs)
Parameters
Returns
mul(float2x4, float4)
public static float2 mul(float2x4 m, float4 v)
Parameters
Returns
mul(float2x4, float4x2)
public static float2x2 mul(float2x4 lhs, float4x2 rhs)
Parameters
Returns
mul(float2x4, float4x3)
public static float2x3 mul(float2x4 lhs, float4x3 rhs)
Parameters
Returns
mul(float2x4, float4x4)
public static float2x4 mul(float2x4 lhs, float4x4 rhs)
Parameters
Returns
mul(float3, float3x2)
public static float2 mul(float3 v, float3x2 m)
Parameters
Returns
mul(float3, float3x3)
public static float3 mul(float3 v, float3x3 m)
Parameters
Returns
mul(float3, float3x4)
public static float4 mul(float3 v, float3x4 m)
Parameters
Returns
mul(float3x2, float2)
public static float3 mul(float3x2 m, float2 v)
Parameters
Returns
mul(float3x2, float2x2)
public static float3x2 mul(float3x2 lhs, float2x2 rhs)
Parameters
Returns
mul(float3x2, float2x3)
public static float3x3 mul(float3x2 lhs, float2x3 rhs)
Parameters
Returns
mul(float3x2, float2x4)
public static float3x4 mul(float3x2 lhs, float2x4 rhs)
Parameters
Returns
mul(float3x3, float3)
public static float3 mul(float3x3 m, float3 v)
Parameters
Returns
mul(float3x3, float3x2)
public static float3x2 mul(float3x3 lhs, float3x2 rhs)
Parameters
Returns
mul(float3x3, float3x3)
public static float3x3 mul(float3x3 lhs, float3x3 rhs)
Parameters
Returns
mul(float3x3, float3x4)
public static float3x4 mul(float3x3 lhs, float3x4 rhs)
Parameters
Returns
mul(float3x4, float4)
public static float3 mul(float3x4 m, float4 v)
Parameters
Returns
mul(float3x4, float4x2)
public static float3x2 mul(float3x4 lhs, float4x2 rhs)
Parameters
Returns
mul(float3x4, float4x3)
public static float3x3 mul(float3x4 lhs, float4x3 rhs)
Parameters
Returns
mul(float3x4, float4x4)
public static float3x4 mul(float3x4 lhs, float4x4 rhs)
Parameters
Returns
mul(float4, float4x2)
public static float2 mul(float4 v, float4x2 m)
Parameters
Returns
mul(float4, float4x3)
public static float3 mul(float4 v, float4x3 m)
Parameters
Returns
mul(float4, float4x4)
public static float4 mul(float4 v, float4x4 m)
Parameters
Returns
mul(float4x2, float2)
public static float4 mul(float4x2 m, float2 v)
Parameters
Returns
mul(float4x2, float2x2)
public static float4x2 mul(float4x2 lhs, float2x2 rhs)
Parameters
Returns
mul(float4x2, float2x3)
public static float4x3 mul(float4x2 lhs, float2x3 rhs)
Parameters
Returns
mul(float4x2, float2x4)
public static float4x4 mul(float4x2 lhs, float2x4 rhs)
Parameters
Returns
mul(float4x3, float3)
public static float4 mul(float4x3 m, float3 v)
Parameters
Returns
mul(float4x3, float3x2)
public static float4x2 mul(float4x3 lhs, float3x2 rhs)
Parameters
Returns
mul(float4x3, float3x3)
public static float4x3 mul(float4x3 lhs, float3x3 rhs)
Parameters
Returns
mul(float4x3, float3x4)
public static float4x4 mul(float4x3 lhs, float3x4 rhs)
Parameters
Returns
mul(float4x4, float4)
public static float4 mul(float4x4 m, float4 v)
Parameters
Returns
mul(float4x4, float4x2)
public static float4x2 mul(float4x4 lhs, float4x2 rhs)
Parameters
Returns
mul(float4x4, float4x3)
public static float4x3 mul(float4x4 lhs, float4x3 rhs)
Parameters
Returns
mul(float4x4, float4x4)
public static float4x4 mul(float4x4 lhs, float4x4 rhs)
Parameters
Returns
mul(int2, int2x2)
public static int2 mul(int2 v, int2x2 m)
Parameters
Returns
mul(int2, int2x3)
public static int3 mul(int2 v, int2x3 m)
Parameters
Returns
mul(int2, int2x4)
public static int4 mul(int2 v, int2x4 m)
Parameters
Returns
mul(int2x2, int2)
public static int2 mul(int2x2 m, int2 v)
Parameters
Returns
mul(int2x2, int2x2)
public static int2x2 mul(int2x2 lhs, int2x2 rhs)
Parameters
Returns
mul(int2x2, int2x3)
public static int2x3 mul(int2x2 lhs, int2x3 rhs)
Parameters
Returns
mul(int2x2, int2x4)
public static int2x4 mul(int2x2 lhs, int2x4 rhs)
Parameters
Returns
mul(int2x3, int3)
public static int2 mul(int2x3 m, int3 v)
Parameters
Returns
mul(int2x3, int3x2)
public static int2x2 mul(int2x3 lhs, int3x2 rhs)
Parameters
Returns
mul(int2x3, int3x3)
public static int2x3 mul(int2x3 lhs, int3x3 rhs)
Parameters
Returns
mul(int2x3, int3x4)
public static int2x4 mul(int2x3 lhs, int3x4 rhs)
Parameters
Returns
mul(int2x4, int4)
public static int2 mul(int2x4 m, int4 v)
Parameters
Returns
mul(int2x4, int4x2)
public static int2x2 mul(int2x4 lhs, int4x2 rhs)
Parameters
Returns
mul(int2x4, int4x3)
public static int2x3 mul(int2x4 lhs, int4x3 rhs)
Parameters
Returns
mul(int2x4, int4x4)
public static int2x4 mul(int2x4 lhs, int4x4 rhs)
Parameters
Returns
mul(int3, int3x2)
public static int2 mul(int3 v, int3x2 m)
Parameters
Returns
mul(int3, int3x3)
public static int3 mul(int3 v, int3x3 m)
Parameters
Returns
mul(int3, int3x4)
public static int4 mul(int3 v, int3x4 m)
Parameters
Returns
mul(int3x2, int2)
public static int3 mul(int3x2 m, int2 v)
Parameters
Returns
mul(int3x2, int2x2)
public static int3x2 mul(int3x2 lhs, int2x2 rhs)
Parameters
Returns
mul(int3x2, int2x3)
public static int3x3 mul(int3x2 lhs, int2x3 rhs)
Parameters
Returns
mul(int3x2, int2x4)
public static int3x4 mul(int3x2 lhs, int2x4 rhs)
Parameters
Returns
mul(int3x3, int3)
public static int3 mul(int3x3 m, int3 v)
Parameters
Returns
mul(int3x3, int3x2)
public static int3x2 mul(int3x3 lhs, int3x2 rhs)
Parameters
Returns
mul(int3x3, int3x3)
public static int3x3 mul(int3x3 lhs, int3x3 rhs)
Parameters
Returns
mul(int3x3, int3x4)
public static int3x4 mul(int3x3 lhs, int3x4 rhs)
Parameters
Returns
mul(int3x4, int4)
public static int3 mul(int3x4 m, int4 v)
Parameters
Returns
mul(int3x4, int4x2)
public static int3x2 mul(int3x4 lhs, int4x2 rhs)
Parameters
Returns
mul(int3x4, int4x3)
public static int3x3 mul(int3x4 lhs, int4x3 rhs)
Parameters
Returns
mul(int3x4, int4x4)
public static int3x4 mul(int3x4 lhs, int4x4 rhs)
Parameters
Returns
mul(int4, int4x2)
public static int2 mul(int4 v, int4x2 m)
Parameters
Returns
mul(int4, int4x3)
public static int3 mul(int4 v, int4x3 m)
Parameters
Returns
mul(int4, int4x4)
public static int4 mul(int4 v, int4x4 m)
Parameters
Returns
mul(int4x2, int2)
public static int4 mul(int4x2 m, int2 v)
Parameters
Returns
mul(int4x2, int2x2)
public static int4x2 mul(int4x2 lhs, int2x2 rhs)
Parameters
Returns
mul(int4x2, int2x3)
public static int4x3 mul(int4x2 lhs, int2x3 rhs)
Parameters
Returns
mul(int4x2, int2x4)
public static int4x4 mul(int4x2 lhs, int2x4 rhs)
Parameters
Returns
mul(int4x3, int3)
public static int4 mul(int4x3 m, int3 v)
Parameters
Returns
mul(int4x3, int3x2)
public static int4x2 mul(int4x3 lhs, int3x2 rhs)
Parameters
Returns
mul(int4x3, int3x3)
public static int4x3 mul(int4x3 lhs, int3x3 rhs)
Parameters
Returns
mul(int4x3, int3x4)
public static int4x4 mul(int4x3 lhs, int3x4 rhs)
Parameters
Returns
mul(int4x4, int4)
public static int4 mul(int4x4 m, int4 v)
Parameters
Returns
mul(int4x4, int4x2)
public static int4x2 mul(int4x4 lhs, int4x2 rhs)
Parameters
Returns
mul(int4x4, int4x3)
public static int4x3 mul(int4x4 lhs, int4x3 rhs)
Parameters
Returns
mul(int4x4, int4x4)
public static int4x4 mul(int4x4 lhs, int4x4 rhs)
Parameters
Returns
mul(quaternion, float3)
Returns the result of transforming a vector by a quaternion.
public static float3 mul(quaternion q, float3 v)
Parameters
qquaternionThe quaternion transformation.
vfloat3The 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
aquaternionThe quaternion on the left.
bquaternionThe 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
Returns
mul(uint2, uint2x3)
public static uint3 mul(uint2 v, uint2x3 m)
Parameters
Returns
mul(uint2, uint2x4)
public static uint4 mul(uint2 v, uint2x4 m)
Parameters
Returns
mul(uint2x2, uint2)
public static uint2 mul(uint2x2 m, uint2 v)
Parameters
Returns
mul(uint2x2, uint2x2)
public static uint2x2 mul(uint2x2 lhs, uint2x2 rhs)
Parameters
Returns
mul(uint2x2, uint2x3)
public static uint2x3 mul(uint2x2 lhs, uint2x3 rhs)
Parameters
Returns
mul(uint2x2, uint2x4)
public static uint2x4 mul(uint2x2 lhs, uint2x4 rhs)
Parameters
Returns
mul(uint2x3, uint3)
public static uint2 mul(uint2x3 m, uint3 v)
Parameters
Returns
mul(uint2x3, uint3x2)
public static uint2x2 mul(uint2x3 lhs, uint3x2 rhs)
Parameters
Returns
mul(uint2x3, uint3x3)
public static uint2x3 mul(uint2x3 lhs, uint3x3 rhs)
Parameters
Returns
mul(uint2x3, uint3x4)
public static uint2x4 mul(uint2x3 lhs, uint3x4 rhs)
Parameters
Returns
mul(uint2x4, uint4)
public static uint2 mul(uint2x4 m, uint4 v)
Parameters
Returns
mul(uint2x4, uint4x2)
public static uint2x2 mul(uint2x4 lhs, uint4x2 rhs)
Parameters
Returns
mul(uint2x4, uint4x3)
public static uint2x3 mul(uint2x4 lhs, uint4x3 rhs)
Parameters
Returns
mul(uint2x4, uint4x4)
public static uint2x4 mul(uint2x4 lhs, uint4x4 rhs)
Parameters
Returns
mul(uint3, uint3x2)
public static uint2 mul(uint3 v, uint3x2 m)
Parameters
Returns
mul(uint3, uint3x3)
public static uint3 mul(uint3 v, uint3x3 m)
Parameters
Returns
mul(uint3, uint3x4)
public static uint4 mul(uint3 v, uint3x4 m)
Parameters
Returns
mul(uint3x2, uint2)
public static uint3 mul(uint3x2 m, uint2 v)
Parameters
Returns
mul(uint3x2, uint2x2)
public static uint3x2 mul(uint3x2 lhs, uint2x2 rhs)
Parameters
Returns
mul(uint3x2, uint2x3)
public static uint3x3 mul(uint3x2 lhs, uint2x3 rhs)
Parameters
Returns
mul(uint3x2, uint2x4)
public static uint3x4 mul(uint3x2 lhs, uint2x4 rhs)
Parameters
Returns
mul(uint3x3, uint3)
public static uint3 mul(uint3x3 m, uint3 v)
Parameters
Returns
mul(uint3x3, uint3x2)
public static uint3x2 mul(uint3x3 lhs, uint3x2 rhs)
Parameters
Returns
mul(uint3x3, uint3x3)
public static uint3x3 mul(uint3x3 lhs, uint3x3 rhs)
Parameters
Returns
mul(uint3x3, uint3x4)
public static uint3x4 mul(uint3x3 lhs, uint3x4 rhs)
Parameters
Returns
mul(uint3x4, uint4)
public static uint3 mul(uint3x4 m, uint4 v)
Parameters
Returns
mul(uint3x4, uint4x2)
public static uint3x2 mul(uint3x4 lhs, uint4x2 rhs)
Parameters
Returns
mul(uint3x4, uint4x3)
public static uint3x3 mul(uint3x4 lhs, uint4x3 rhs)
Parameters
Returns
mul(uint3x4, uint4x4)
public static uint3x4 mul(uint3x4 lhs, uint4x4 rhs)
Parameters
Returns
mul(uint4, uint4x2)
public static uint2 mul(uint4 v, uint4x2 m)
Parameters
Returns
mul(uint4, uint4x3)
public static uint3 mul(uint4 v, uint4x3 m)
Parameters
Returns
mul(uint4, uint4x4)
public static uint4 mul(uint4 v, uint4x4 m)
Parameters
Returns
mul(uint4x2, uint2)
public static uint4 mul(uint4x2 m, uint2 v)
Parameters
Returns
mul(uint4x2, uint2x2)
public static uint4x2 mul(uint4x2 lhs, uint2x2 rhs)
Parameters
Returns
mul(uint4x2, uint2x3)
public static uint4x3 mul(uint4x2 lhs, uint2x3 rhs)
Parameters
Returns
mul(uint4x2, uint2x4)
public static uint4x4 mul(uint4x2 lhs, uint2x4 rhs)
Parameters
Returns
mul(uint4x3, uint3)
public static uint4 mul(uint4x3 m, uint3 v)
Parameters
Returns
mul(uint4x3, uint3x2)
public static uint4x2 mul(uint4x3 lhs, uint3x2 rhs)
Parameters
Returns
mul(uint4x3, uint3x3)
public static uint4x3 mul(uint4x3 lhs, uint3x3 rhs)
Parameters
Returns
mul(uint4x3, uint3x4)
public static uint4x4 mul(uint4x3 lhs, uint3x4 rhs)
Parameters
Returns
mul(uint4x4, uint4)
public static uint4 mul(uint4x4 m, uint4 v)
Parameters
Returns
mul(uint4x4, uint4x2)
public static uint4x2 mul(uint4x4 lhs, uint4x2 rhs)
Parameters
Returns
mul(uint4x4, uint4x3)
public static uint4x3 mul(uint4x4 lhs, uint4x3 rhs)
Parameters
Returns
mul(uint4x4, uint4x4)
public static uint4x4 mul(uint4x4 lhs, uint4x4 rhs)
Parameters
Returns
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
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
q1quaternionThe first quaternion.
q2quaternionThe second quaternion.
tfloatThe 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
xdouble2Vector 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
xdouble3Vector 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
xdouble4Vector 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
xfloat2Vector 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
xfloat3Vector 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
xfloat4Vector 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
qquaternionThe 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
xdouble2Vector to normalize.
defaultvaluedouble2Vector 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
xdouble3Vector to normalize.
defaultvaluedouble3Vector 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
xdouble4Vector to normalize.
defaultvaluedouble4Vector 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
xfloat2Vector to normalize.
defaultvaluefloat2Vector 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
xfloat3Vector to normalize.
defaultvaluefloat3Vector 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
xfloat4Vector to normalize.
defaultvaluefloat4Vector 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
qquaternionThe 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
qquaternionThe quaternion to normalize.
defaultvaluequaternionThe 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
normaldouble3Unit length normal vector.
basis1double3Output unit length vector, orthogonal to normal vector.
basis2double3Output 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
normalfloat3Unit length normal vector.
basis1float3Output unit length vector, orthogonal to normal vector.
basis2float3Output 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
adouble2Vector to project.
ontoBdouble2Non-zero vector to project onto.
defaultValuedouble2Default 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
adouble3Vector to project.
ontoBdouble3Non-zero vector to project onto.
defaultValuedouble3Default 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
adouble4Vector to project.
ontoBdouble4Non-zero vector to project onto.
defaultValuedouble4Default 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
afloat2Vector to project.
ontoBfloat2Non-zero vector to project onto.
defaultValuefloat2Default 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
afloat3Vector to project.
ontoBfloat3Non-zero vector to project onto.
defaultValuefloat3Default 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
afloat4Vector to project.
ontoBfloat4Non-zero vector to project onto.
defaultValuefloat4Default 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
valuefloat4The 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
xfloatThe x component of the quaternion.
yfloatThe y component of the quaternion.
zfloatThe z component of the quaternion.
wfloatThe 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
xdouble2Vector 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
xdouble3Vector 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
xdouble4Vector 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
xfloat2Vector 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
xfloat3Vector 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
xfloat4Vector 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
xdoubleAngle 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
xfloatAngle in degrees.
Returns
- float
Angle converted to radians.
rcp(double2)
Returns the componentwise reciprocal a double2 vector.
public static double2 rcp(double2 x)
Parameters
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input value.
Returns
- float4
The componentwise reciprocal of the input.
rcp(double)
Returns the reciprocal a double value.
public static double rcp(double x)
Parameters
xdoubleInput value.
Returns
- double
The reciprocal of the input.
rcp(float)
Returns the reciprocal a float value.
public static float rcp(float x)
Parameters
xfloatInput 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
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
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
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
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
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
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
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
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
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
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
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
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
srcStartdouble2The start point of the source range [srcStart, srcEnd].
srcEnddouble2The end point of the source range [srcStart, srcEnd].
dstStartdouble2The start point of the destination range [dstStart, dstEnd].
dstEnddouble2The end point of the destination range [dstStart, dstEnd].
xdouble2The 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
srcStartdouble3The start point of the source range [srcStart, srcEnd].
srcEnddouble3The end point of the source range [srcStart, srcEnd].
dstStartdouble3The start point of the destination range [dstStart, dstEnd].
dstEnddouble3The end point of the destination range [dstStart, dstEnd].
xdouble3The 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
srcStartdouble4The start point of the source range [srcStart, srcEnd].
srcEnddouble4The end point of the source range [srcStart, srcEnd].
dstStartdouble4The start point of the destination range [dstStart, dstEnd].
dstEnddouble4The end point of the destination range [dstStart, dstEnd].
xdouble4The 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
srcStartfloat2The start point of the source range [srcStart, srcEnd].
srcEndfloat2The end point of the source range [srcStart, srcEnd].
dstStartfloat2The start point of the destination range [dstStart, dstEnd].
dstEndfloat2The end point of the destination range [dstStart, dstEnd].
xfloat2The 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
srcStartfloat3The start point of the source range [srcStart, srcEnd].
srcEndfloat3The end point of the source range [srcStart, srcEnd].
dstStartfloat3The start point of the destination range [dstStart, dstEnd].
dstEndfloat3The end point of the destination range [dstStart, dstEnd].
xfloat3The 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
srcStartfloat4The start point of the source range [srcStart, srcEnd].
srcEndfloat4The end point of the source range [srcStart, srcEnd].
dstStartfloat4The start point of the destination range [dstStart, dstEnd].
dstEndfloat4The end point of the destination range [dstStart, dstEnd].
xfloat4The 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
srcStartdoubleThe start point of the source range [srcStart, srcEnd].
srcEnddoubleThe end point of the source range [srcStart, srcEnd].
dstStartdoubleThe start point of the destination range [dstStart, dstEnd].
dstEnddoubleThe end point of the destination range [dstStart, dstEnd].
xdoubleThe 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
srcStartfloatThe start point of the source range [srcStart, srcEnd].
srcEndfloatThe end point of the source range [srcStart, srcEnd].
dstStartfloatThe start point of the destination range [dstStart, dstEnd].
dstEndfloatThe end point of the destination range [dstStart, dstEnd].
xfloatThe 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
xint2Value 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
xint3Value 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
xint4Value 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
xuint2Value 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
xuint3Value 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
xuint4Value 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
xintValue 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
xlongValue 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
xuintValue 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
xulongValue 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
qquaternionThe quaternion rotation.
vfloat3The 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
mfloat3x3Matrix 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xdouble2Value 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
xdouble3Value 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
xdouble4Value 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
xfloat2Value 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
xfloat3Value 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
xfloat4Value 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
xdoubleValue 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
xfloatValue 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
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
trueValuedouble2Values to use if test is true.
falseValuedouble2Values to use if test is false.
testbool2Selection 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
trueValuedouble2Value to use if test is true.
falseValuedouble2Value to use if test is false.
testboolBool 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
trueValuedouble3Values to use if test is true.
falseValuedouble3Values to use if test is false.
testbool3Selection 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
trueValuedouble3Value to use if test is true.
falseValuedouble3Value to use if test is false.
testboolBool 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
trueValuedouble4Values to use if test is true.
falseValuedouble4Values to use if test is false.
testbool4Selection 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
trueValuedouble4Value to use if test is true.
falseValuedouble4Value to use if test is false.
testboolBool 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
trueValuefloat2Values to use if test is true.
falseValuefloat2Values to use if test is false.
testbool2Selection 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
trueValuefloat2Value to use if test is true.
falseValuefloat2Value to use if test is false.
testboolBool 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
trueValuefloat3Values to use if test is true.
falseValuefloat3Values to use if test is false.
testbool3Selection 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
trueValuefloat3Value to use if test is true.
falseValuefloat3Value to use if test is false.
testboolBool 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
trueValuefloat4Values to use if test is true.
falseValuefloat4Values to use if test is false.
testbool4Selection 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
trueValuefloat4Value to use if test is true.
falseValuefloat4Value to use if test is false.
testboolBool 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
trueValueint2Values to use if test is true.
falseValueint2Values to use if test is false.
testbool2Selection 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
trueValueint2Value to use if test is true.
falseValueint2Value to use if test is false.
testboolBool 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
trueValueint3Values to use if test is true.
falseValueint3Values to use if test is false.
testbool3Selection 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
trueValueint3Value to use if test is true.
falseValueint3Value to use if test is false.
testboolBool 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
trueValueint4Values to use if test is true.
falseValueint4Values to use if test is false.
testbool4Selection 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
trueValueint4Value to use if test is true.
falseValueint4Value to use if test is false.
testboolBool 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
trueValueuint2Values to use if test is true.
falseValueuint2Values to use if test is false.
testbool2Selection 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
trueValueuint2Value to use if test is true.
falseValueuint2Value to use if test is false.
testboolBool 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
trueValueuint3Values to use if test is true.
falseValueuint3Values to use if test is false.
testbool3Selection 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
trueValueuint3Value to use if test is true.
falseValueuint3Value to use if test is false.
testboolBool 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
trueValueuint4Values to use if test is true.
falseValueuint4Values to use if test is false.
testbool4Selection 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
trueValueuint4Value to use if test is true.
falseValueuint4Value to use if test is false.
testboolBool 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
trueValuedoubleValue to use if test is true.
falseValuedoubleValue to use if test is false.
testboolBool 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
trueValueintValue to use if test is true.
falseValueintValue to use if test is false.
testboolBool 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
trueValuelongValue to use if test is true.
falseValuelongValue to use if test is false.
testboolBool 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
trueValuefloatValue to use if test is true.
falseValuefloatValue to use if test is false.
testboolBool 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
trueValueuintValue to use if test is true.
falseValueuintValue to use if test is false.
testboolBool 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
trueValueulongValue to use if test is true.
falseValueulongValue to use if test is false.
testboolBool 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
leftbool2rightbool2xmath.ShuffleComponent
Returns
shuffle(bool2, bool2, ShuffleComponent, ShuffleComponent)
public static bool2 shuffle(bool2 left, bool2 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftbool2rightbool2xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(bool3, bool3, ShuffleComponent)
public static uint shuffle(bool3 left, bool3 right, math.ShuffleComponent x)
Parameters
leftbool3rightbool3xmath.ShuffleComponent
Returns
shuffle(bool3, bool3, ShuffleComponent, ShuffleComponent)
public static bool2 shuffle(bool3 left, bool3 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftbool3rightbool3xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(bool3, bool3, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static bool3 shuffle(bool3 left, bool3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftbool3rightbool3xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
shuffle(bool4, bool4, ShuffleComponent)
public static uint shuffle(bool4 left, bool4 right, math.ShuffleComponent x)
Parameters
leftbool4rightbool4xmath.ShuffleComponent
Returns
shuffle(bool4, bool4, ShuffleComponent, ShuffleComponent)
public static bool2 shuffle(bool4 left, bool4 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftbool4rightbool4xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(bool4, bool4, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static bool3 shuffle(bool4 left, bool4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftbool4rightbool4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
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
leftbool4rightbool4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponentwmath.ShuffleComponent
Returns
shuffle(double2, double2, ShuffleComponent)
public static double shuffle(double2 left, double2 right, math.ShuffleComponent x)
Parameters
leftdouble2rightdouble2xmath.ShuffleComponent
Returns
shuffle(double2, double2, ShuffleComponent, ShuffleComponent)
public static double2 shuffle(double2 left, double2 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftdouble2rightdouble2xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(double3, double3, ShuffleComponent)
public static double shuffle(double3 left, double3 right, math.ShuffleComponent x)
Parameters
leftdouble3rightdouble3xmath.ShuffleComponent
Returns
shuffle(double3, double3, ShuffleComponent, ShuffleComponent)
public static double2 shuffle(double3 left, double3 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftdouble3rightdouble3xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(double3, double3, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static double3 shuffle(double3 left, double3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftdouble3rightdouble3xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
shuffle(double4, double4, ShuffleComponent)
public static double shuffle(double4 left, double4 right, math.ShuffleComponent x)
Parameters
leftdouble4rightdouble4xmath.ShuffleComponent
Returns
shuffle(double4, double4, ShuffleComponent, ShuffleComponent)
public static double2 shuffle(double4 left, double4 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftdouble4rightdouble4xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(double4, double4, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static double3 shuffle(double4 left, double4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftdouble4rightdouble4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
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
leftdouble4rightdouble4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponentwmath.ShuffleComponent
Returns
shuffle(float2, float2, ShuffleComponent)
public static float shuffle(float2 left, float2 right, math.ShuffleComponent x)
Parameters
leftfloat2rightfloat2xmath.ShuffleComponent
Returns
shuffle(float2, float2, ShuffleComponent, ShuffleComponent)
public static float2 shuffle(float2 left, float2 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftfloat2rightfloat2xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(float3, float3, ShuffleComponent)
public static float shuffle(float3 left, float3 right, math.ShuffleComponent x)
Parameters
leftfloat3rightfloat3xmath.ShuffleComponent
Returns
shuffle(float3, float3, ShuffleComponent, ShuffleComponent)
public static float2 shuffle(float3 left, float3 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftfloat3rightfloat3xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(float3, float3, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static float3 shuffle(float3 left, float3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftfloat3rightfloat3xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
shuffle(float4, float4, ShuffleComponent)
public static float shuffle(float4 left, float4 right, math.ShuffleComponent x)
Parameters
leftfloat4rightfloat4xmath.ShuffleComponent
Returns
shuffle(float4, float4, ShuffleComponent, ShuffleComponent)
public static float2 shuffle(float4 left, float4 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftfloat4rightfloat4xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(float4, float4, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static float3 shuffle(float4 left, float4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftfloat4rightfloat4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
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
leftfloat4rightfloat4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponentwmath.ShuffleComponent
Returns
shuffle(int2, int2, ShuffleComponent)
public static int shuffle(int2 left, int2 right, math.ShuffleComponent x)
Parameters
leftint2rightint2xmath.ShuffleComponent
Returns
shuffle(int2, int2, ShuffleComponent, ShuffleComponent)
public static int2 shuffle(int2 left, int2 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftint2rightint2xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(int3, int3, ShuffleComponent)
public static int shuffle(int3 left, int3 right, math.ShuffleComponent x)
Parameters
leftint3rightint3xmath.ShuffleComponent
Returns
shuffle(int3, int3, ShuffleComponent, ShuffleComponent)
public static int2 shuffle(int3 left, int3 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftint3rightint3xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(int3, int3, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static int3 shuffle(int3 left, int3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftint3rightint3xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
shuffle(int4, int4, ShuffleComponent)
public static int shuffle(int4 left, int4 right, math.ShuffleComponent x)
Parameters
leftint4rightint4xmath.ShuffleComponent
Returns
shuffle(int4, int4, ShuffleComponent, ShuffleComponent)
public static int2 shuffle(int4 left, int4 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftint4rightint4xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(int4, int4, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static int3 shuffle(int4 left, int4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftint4rightint4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
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
leftint4rightint4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponentwmath.ShuffleComponent
Returns
shuffle(uint2, uint2, ShuffleComponent)
public static uint shuffle(uint2 left, uint2 right, math.ShuffleComponent x)
Parameters
leftuint2rightuint2xmath.ShuffleComponent
Returns
shuffle(uint2, uint2, ShuffleComponent, ShuffleComponent)
public static uint2 shuffle(uint2 left, uint2 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftuint2rightuint2xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(uint3, uint3, ShuffleComponent)
public static uint shuffle(uint3 left, uint3 right, math.ShuffleComponent x)
Parameters
leftuint3rightuint3xmath.ShuffleComponent
Returns
shuffle(uint3, uint3, ShuffleComponent, ShuffleComponent)
public static uint2 shuffle(uint3 left, uint3 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftuint3rightuint3xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(uint3, uint3, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static uint3 shuffle(uint3 left, uint3 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftuint3rightuint3xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
shuffle(uint4, uint4, ShuffleComponent)
public static uint shuffle(uint4 left, uint4 right, math.ShuffleComponent x)
Parameters
leftuint4rightuint4xmath.ShuffleComponent
Returns
shuffle(uint4, uint4, ShuffleComponent, ShuffleComponent)
public static uint2 shuffle(uint4 left, uint4 right, math.ShuffleComponent x, math.ShuffleComponent y)
Parameters
leftuint4rightuint4xmath.ShuffleComponentymath.ShuffleComponent
Returns
shuffle(uint4, uint4, ShuffleComponent, ShuffleComponent, ShuffleComponent)
public static uint3 shuffle(uint4 left, uint4 right, math.ShuffleComponent x, math.ShuffleComponent y, math.ShuffleComponent z)
Parameters
leftuint4rightuint4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponent
Returns
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
leftuint4rightuint4xmath.ShuffleComponentymath.ShuffleComponentzmath.ShuffleComponentwmath.ShuffleComponent
Returns
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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xint2Input 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
xint3Input 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
xint4Input 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
xdoubleInput 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
xintInput 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
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput value.
Returns
- double
The sine of the input.
sin(float)
Returns the sine of a float value.
public static float sin(float x)
Parameters
xfloatInput 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
xdouble2Input vector containing angles in radians.
sdouble2Output vector containing the componentwise sine of the input.
cdouble2Output 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
xdouble3Input vector containing angles in radians.
sdouble3Output vector containing the componentwise sine of the input.
cdouble3Output 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
xdouble4Input vector containing angles in radians.
sdouble4Output vector containing the componentwise sine of the input.
cdouble4Output 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
xfloat2Input vector containing angles in radians.
sfloat2Output vector containing the componentwise sine of the input.
cfloat2Output 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
xfloat3Input vector containing angles in radians.
sfloat3Output vector containing the componentwise sine of the input.
cfloat3Output 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
xfloat4Input vector containing angles in radians.
sfloat4Output vector containing the componentwise sine of the input.
cfloat4Output 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
xdoubleInput angle in radians.
sdoubleOutput sine of the input.
cdoubleOutput 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
xfloatInput angle in radians.
sfloatOutput sine of the input.
cfloatOutput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
q1quaternionThe first quaternion.
q2quaternionThe second quaternion.
tfloatThe 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
xMindouble2The minimum range of the x parameter.
xMaxdouble2The maximum range of the x parameter.
xdouble2The 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
xMindouble3The minimum range of the x parameter.
xMaxdouble3The maximum range of the x parameter.
xdouble3The 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
xMindouble4The minimum range of the x parameter.
xMaxdouble4The maximum range of the x parameter.
xdouble4The 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
xMinfloat2The minimum range of the x parameter.
xMaxfloat2The maximum range of the x parameter.
xfloat2The 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
xMinfloat3The minimum range of the x parameter.
xMaxfloat3The maximum range of the x parameter.
xfloat3The 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
xMinfloat4The minimum range of the x parameter.
xMaxfloat4The maximum range of the x parameter.
xfloat4The 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
xMindoubleThe minimum range of the x parameter.
xMaxdoubleThe maximum range of the x parameter.
xdoubleThe 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
xMinfloatThe minimum range of the x parameter.
xMaxfloatThe maximum range of the x parameter.
xfloatThe 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
xdouble2Value 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
xdouble3Value 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
xdouble4Value 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
xfloat2Value 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
xfloat3Value 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
xfloat4Value 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
xdoubleValue 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
xfloatValue 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
xdouble2Value 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
xdouble3Value 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
xdouble4Value 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
xfloat2Value 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
xfloat3Value 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
xfloat4Value 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
xint2Value 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
xint3Value 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
xint4Value 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
xuint2Value 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
xuint3Value 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
xuint4Value 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
xdoubleValue 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
xintValue 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
xfloatValue 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
xuintValue 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
thresholddouble2Vector of values to be used as a threshold for returning 1.
xdouble2Vector 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
thresholddouble3Vector of values to be used as a threshold for returning 1.
xdouble3Vector 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
thresholddouble4Vector of values to be used as a threshold for returning 1.
xdouble4Vector 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
thresholdfloat2Vector of values to be used as a threshold for returning 1.
xfloat2Vector 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
thresholdfloat3Vector of values to be used as a threshold for returning 1.
xfloat3Vector 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
thresholdfloat4Vector of values to be used as a threshold for returning 1.
xfloat4Vector 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
thresholddoubleValues to be used as a threshold for returning 1.
xdoubleValue 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
thresholdfloatValue to be used as a threshold for returning 1.
xfloatValue 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput value.
Returns
- double
The tangent of the input.
tan(float)
Returns the tangent of a float value.
public static float tan(float x)
Parameters
xfloatInput 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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput value.
Returns
- float
The hyperbolic tangent of the input.
transpose(bool2x2)
public static bool2x2 transpose(bool2x2 value)
Parameters
valuebool2x2
Returns
transpose(bool2x3)
public static bool3x2 transpose(bool2x3 value)
Parameters
valuebool2x3
Returns
transpose(bool2x4)
public static bool4x2 transpose(bool2x4 value)
Parameters
valuebool2x4
Returns
transpose(bool3x2)
public static bool2x3 transpose(bool3x2 value)
Parameters
valuebool3x2
Returns
transpose(bool3x3)
public static bool3x3 transpose(bool3x3 value)
Parameters
valuebool3x3
Returns
transpose(bool3x4)
public static bool4x3 transpose(bool3x4 value)
Parameters
valuebool3x4
Returns
transpose(bool4x2)
public static bool2x4 transpose(bool4x2 value)
Parameters
valuebool4x2
Returns
transpose(bool4x3)
public static bool3x4 transpose(bool4x3 value)
Parameters
valuebool4x3
Returns
transpose(bool4x4)
public static bool4x4 transpose(bool4x4 value)
Parameters
valuebool4x4
Returns
transpose(double2x2)
public static double2x2 transpose(double2x2 value)
Parameters
valuedouble2x2
Returns
transpose(double2x3)
public static double3x2 transpose(double2x3 value)
Parameters
valuedouble2x3
Returns
transpose(double2x4)
public static double4x2 transpose(double2x4 value)
Parameters
valuedouble2x4
Returns
transpose(double3x2)
public static double2x3 transpose(double3x2 value)
Parameters
valuedouble3x2
Returns
transpose(double3x3)
public static double3x3 transpose(double3x3 value)
Parameters
valuedouble3x3
Returns
transpose(double3x4)
public static double4x3 transpose(double3x4 value)
Parameters
valuedouble3x4
Returns
transpose(double4x2)
public static double2x4 transpose(double4x2 value)
Parameters
valuedouble4x2
Returns
transpose(double4x3)
public static double3x4 transpose(double4x3 value)
Parameters
valuedouble4x3
Returns
transpose(double4x4)
public static double4x4 transpose(double4x4 value)
Parameters
valuedouble4x4
Returns
transpose(float2x2)
public static float2x2 transpose(float2x2 value)
Parameters
valuefloat2x2
Returns
transpose(float2x3)
public static float3x2 transpose(float2x3 value)
Parameters
valuefloat2x3
Returns
transpose(float2x4)
public static float4x2 transpose(float2x4 value)
Parameters
valuefloat2x4
Returns
transpose(float3x2)
public static float2x3 transpose(float3x2 value)
Parameters
valuefloat3x2
Returns
transpose(float3x3)
public static float3x3 transpose(float3x3 value)
Parameters
valuefloat3x3
Returns
transpose(float3x4)
public static float4x3 transpose(float3x4 value)
Parameters
valuefloat3x4
Returns
transpose(float4x2)
public static float2x4 transpose(float4x2 value)
Parameters
valuefloat4x2
Returns
transpose(float4x3)
public static float3x4 transpose(float4x3 value)
Parameters
valuefloat4x3
Returns
transpose(float4x4)
public static float4x4 transpose(float4x4 value)
Parameters
valuefloat4x4
Returns
transpose(int2x2)
public static int2x2 transpose(int2x2 value)
Parameters
valueint2x2
Returns
transpose(int2x3)
public static int3x2 transpose(int2x3 value)
Parameters
valueint2x3
Returns
transpose(int2x4)
public static int4x2 transpose(int2x4 value)
Parameters
valueint2x4
Returns
transpose(int3x2)
public static int2x3 transpose(int3x2 value)
Parameters
valueint3x2
Returns
transpose(int3x3)
public static int3x3 transpose(int3x3 value)
Parameters
valueint3x3
Returns
transpose(int3x4)
public static int4x3 transpose(int3x4 value)
Parameters
valueint3x4
Returns
transpose(int4x2)
public static int2x4 transpose(int4x2 value)
Parameters
valueint4x2
Returns
transpose(int4x3)
public static int3x4 transpose(int4x3 value)
Parameters
valueint4x3
Returns
transpose(int4x4)
public static int4x4 transpose(int4x4 value)
Parameters
valueint4x4
Returns
transpose(uint2x2)
public static uint2x2 transpose(uint2x2 value)
Parameters
valueuint2x2
Returns
transpose(uint2x3)
public static uint3x2 transpose(uint2x3 value)
Parameters
valueuint2x3
Returns
transpose(uint2x4)
public static uint4x2 transpose(uint2x4 value)
Parameters
valueuint2x4
Returns
transpose(uint3x2)
public static uint2x3 transpose(uint3x2 value)
Parameters
valueuint3x2
Returns
transpose(uint3x3)
public static uint3x3 transpose(uint3x3 value)
Parameters
valueuint3x3
Returns
transpose(uint3x4)
public static uint4x3 transpose(uint3x4 value)
Parameters
valueuint3x4
Returns
transpose(uint4x2)
public static uint2x4 transpose(uint4x2 value)
Parameters
valueuint4x2
Returns
transpose(uint4x3)
public static uint3x4 transpose(uint4x3 value)
Parameters
valueuint4x3
Returns
transpose(uint4x4)
public static uint4x4 transpose(uint4x4 value)
Parameters
valueuint4x4
Returns
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
xdouble2Input 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
xdouble3Input 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
xdouble4Input 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
xfloat2Input 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
xfloat3Input 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
xfloat4Input 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
xdoubleInput 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
xfloatInput 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
xint2Input 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
xint3Input 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
xint4Input 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
xuint2Input 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
xuint3Input 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
xuint4Input 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
xintInput 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
xlongInput 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
xuintInput 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
xulongInput 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
vbool2
Returns
uint2(double2)
public static uint2 uint2(double2 v)
Parameters
vdouble2
Returns
uint2(float2)
public static uint2 uint2(float2 v)
Parameters
vfloat2
Returns
uint2(int2)
public static uint2 uint2(int2 v)
Parameters
vint2
Returns
uint2(uint2)
public static uint2 uint2(uint2 xy)
Parameters
xyuint2
Returns
uint2(double)
public static uint2 uint2(double v)
Parameters
vdouble
Returns
uint2(int)
public static uint2 uint2(int v)
Parameters
vint
Returns
uint2(float)
public static uint2 uint2(float v)
Parameters
vfloat
Returns
uint2(uint)
public static uint2 uint2(uint value)
Parameters
valueuint
Returns
uint2(uint, uint)
public static uint2 uint2(uint x, uint y)
Parameters
Returns
uint2x2(uint2)
public static uint2x2 uint2x2(uint2 value)
Parameters
valueuint2
Returns
uint2x2(uint2, uint2)
public static uint2x2 uint2x2(uint2 c0, uint2 c1)
Parameters
Returns
uint2x2(uint)
public static uint2x2 uint2x2(uint value)
Parameters
valueuint
Returns
uint2x2(uint, uint, uint, uint)
public static uint2x2 uint2x2(uint m00, uint m01, uint m10, uint m11)
Parameters
Returns
uint2x3(uint2)
public static uint2x3 uint2x3(uint2 value)
Parameters
valueuint2
Returns
uint2x3(uint2, uint2, uint2)
public static uint2x3 uint2x3(uint2 c0, uint2 c1, uint2 c2)
Parameters
Returns
uint2x3(uint)
public static uint2x3 uint2x3(uint value)
Parameters
valueuint
Returns
uint2x3(uint, uint, uint, uint, uint, uint)
public static uint2x3 uint2x3(uint m00, uint m01, uint m02, uint m10, uint m11, uint m12)
Parameters
Returns
uint2x4(uint2)
public static uint2x4 uint2x4(uint2 value)
Parameters
valueuint2
Returns
uint2x4(uint2, uint2, uint2, uint2)
public static uint2x4 uint2x4(uint2 c0, uint2 c1, uint2 c2, uint2 c3)
Parameters
Returns
uint2x4(uint)
public static uint2x4 uint2x4(uint value)
Parameters
valueuint
Returns
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
Returns
uint3(bool3)
public static uint3 uint3(bool3 v)
Parameters
vbool3
Returns
uint3(double3)
public static uint3 uint3(double3 v)
Parameters
vdouble3
Returns
uint3(float3)
public static uint3 uint3(float3 v)
Parameters
vfloat3
Returns
uint3(int3)
public static uint3 uint3(int3 v)
Parameters
vint3
Returns
uint3(uint2, uint)
public static uint3 uint3(uint2 xy, uint z)
Parameters
Returns
uint3(uint3)
public static uint3 uint3(uint3 xyz)
Parameters
xyzuint3
Returns
uint3(double)
public static uint3 uint3(double v)
Parameters
vdouble
Returns
uint3(int)
public static uint3 uint3(int v)
Parameters
vint
Returns
uint3(float)
public static uint3 uint3(float v)
Parameters
vfloat
Returns
uint3(uint)
public static uint3 uint3(uint value)
Parameters
valueuint
Returns
uint3(uint, uint2)
public static uint3 uint3(uint x, uint2 yz)
Parameters
Returns
uint3(uint, uint, uint)
public static uint3 uint3(uint x, uint y, uint z)
Parameters
Returns
uint3x2(uint3)
public static uint3x2 uint3x2(uint3 value)
Parameters
valueuint3
Returns
uint3x2(uint3, uint3)
public static uint3x2 uint3x2(uint3 c0, uint3 c1)
Parameters
Returns
uint3x2(uint)
public static uint3x2 uint3x2(uint value)
Parameters
valueuint
Returns
uint3x2(uint, uint, uint, uint, uint, uint)
public static uint3x2 uint3x2(uint m00, uint m01, uint m10, uint m11, uint m20, uint m21)
Parameters
Returns
uint3x3(uint3)
public static uint3x3 uint3x3(uint3 value)
Parameters
valueuint3
Returns
uint3x3(uint3, uint3, uint3)
public static uint3x3 uint3x3(uint3 c0, uint3 c1, uint3 c2)
Parameters
Returns
uint3x3(uint)
public static uint3x3 uint3x3(uint value)
Parameters
valueuint
Returns
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
Returns
uint3x4(uint3)
public static uint3x4 uint3x4(uint3 value)
Parameters
valueuint3
Returns
uint3x4(uint3, uint3, uint3, uint3)
public static uint3x4 uint3x4(uint3 c0, uint3 c1, uint3 c2, uint3 c3)
Parameters
Returns
uint3x4(uint)
public static uint3x4 uint3x4(uint value)
Parameters
valueuint
Returns
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
m00uintm01uintm02uintm03uintm10uintm11uintm12uintm13uintm20uintm21uintm22uintm23uint
Returns
uint4(bool4)
public static uint4 uint4(bool4 v)
Parameters
vbool4
Returns
uint4(double4)
public static uint4 uint4(double4 v)
Parameters
vdouble4
Returns
uint4(float4)
public static uint4 uint4(float4 v)
Parameters
vfloat4
Returns
uint4(int4)
public static uint4 uint4(int4 v)
Parameters
vint4
Returns
uint4(uint2, uint2)
public static uint4 uint4(uint2 xy, uint2 zw)
Parameters
Returns
uint4(uint2, uint, uint)
public static uint4 uint4(uint2 xy, uint z, uint w)
Parameters
Returns
uint4(uint3, uint)
public static uint4 uint4(uint3 xyz, uint w)
Parameters
Returns
uint4(double)
public static uint4 uint4(double v)
Parameters
vdouble
Returns
uint4(int)
public static uint4 uint4(int v)
Parameters
vint
Returns
uint4(float)
public static uint4 uint4(float v)
Parameters
vfloat
Returns
uint4(uint)
public static uint4 uint4(uint value)
Parameters
valueuint
Returns
uint4(uint, uint2, uint)
public static uint4 uint4(uint x, uint2 yz, uint w)
Parameters
Returns
uint4(uint, uint3)
public static uint4 uint4(uint x, uint3 yzw)
Parameters
Returns
uint4(uint, uint, uint2)
public static uint4 uint4(uint x, uint y, uint2 zw)
Parameters
Returns
uint4(uint, uint, uint, uint)
public static uint4 uint4(uint x, uint y, uint z, uint w)
Parameters
Returns
uint4x2(uint4)
public static uint4x2 uint4x2(uint4 value)
Parameters
valueuint4
Returns
uint4x2(uint4, uint4)
public static uint4x2 uint4x2(uint4 c0, uint4 c1)
Parameters
Returns
uint4x2(uint)
public static uint4x2 uint4x2(uint value)
Parameters
valueuint
Returns
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
Returns
uint4x3(uint4)
public static uint4x3 uint4x3(uint4 value)
Parameters
valueuint4
Returns
uint4x3(uint4, uint4, uint4)
public static uint4x3 uint4x3(uint4 c0, uint4 c1, uint4 c2)
Parameters
Returns
uint4x3(uint)
public static uint4x3 uint4x3(uint value)
Parameters
valueuint
Returns
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
m00uintm01uintm02uintm10uintm11uintm12uintm20uintm21uintm22uintm30uintm31uintm32uint
Returns
uint4x4(uint4)
public static uint4x4 uint4x4(uint4 value)
Parameters
valueuint4
Returns
uint4x4(uint4, uint4, uint4, uint4)
public static uint4x4 uint4x4(uint4 c0, uint4 c1, uint4 c2, uint4 c3)
Parameters
Returns
uint4x4(uint)
public static uint4x4 uint4x4(uint value)
Parameters
valueuint
Returns
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
m00uintm01uintm02uintm03uintm10uintm11uintm12uintm13uintm20uintm21uintm22uintm23uintm30uintm31uintm32uintm33uint
Returns
unitexp(quaternion)
Returns the natural exponent of a quaternion. Assumes w is zero.
public static quaternion unitexp(quaternion q)
Parameters
qquaternionThe 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
qquaternionThe 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
startdouble2The start point of the range.
enddouble2The end point of the range.
xdouble2The 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
startdouble3The start point of the range.
enddouble3The end point of the range.
xdouble3The 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
startdouble4The start point of the range.
enddouble4The end point of the range.
xdouble4The 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
startfloat2The start point of the range.
endfloat2The end point of the range.
xfloat2The 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
startfloat3The start point of the range.
endfloat3The end point of the range.
xfloat3The 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
startfloat4The start point of the range.
endfloat4The end point of the range.
xfloat4The 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
startdoubleThe start point of the range.
enddoubleThe end point of the range.
xdoubleThe 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
startfloatThe start point of the range.
endfloatThe end point of the range.
xfloatThe 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.