chgsign
Change the sign of x based on the most significant bit of y [msb(y)? -x: x].
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
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
Returns
Type | Description |
|---|---|
| float | Returns x with changed sign based on y. |
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
Returns
Type | Description |
|---|---|
| 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
Returns
Type | Description |
|---|---|
| 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
Returns
Type | Description |
|---|---|
| float4 | Returns vector x with changed sign based on vector y. |