ドキュメント

Unity Engine

Unity Engine

chgsign

Change the sign of x based on the most significant bit of y [msb(y)? -x: x].
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

The single precision float to change the sign.

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

Returns

Type

Description

floatReturns 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

The single precision float vector to change the sign.

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

Returns

Type

Description

float2Returns 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

The single precision float vector to change the sign.

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

Returns

Type

Description

float3Returns 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

The single precision float vector to change the sign.

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

Returns

Type

Description

float4Returns vector x with changed sign based on vector y.