Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CopySign()

static float System.MathF.CopySign ( float x,
float y )
inlinestatic

Definition at line 174 of file MathF.cs.

175 {
177 {
179 }
180 return SoftwareFallback(x, y);
181 static float SoftwareFallback(float x, float y)
182 {
183 int num = BitConverter.SingleToInt32Bits(x);
184 int num2 = BitConverter.SingleToInt32Bits(y);
185 num &= 0x7FFFFFFF;
186 num2 &= int.MinValue;
187 return BitConverter.Int32BitsToSingle(num | num2);
188 }
189 }
static Vector128< float > ConditionalSelectBitwise(Vector128< float > selector, Vector128< float > ifTrue, Vector128< float > ifFalse)
Definition VectorMath.cs:11
static unsafe Vector128< byte > CreateScalarUnsafe(byte value)
Definition Vector128.cs:829
static new bool IsSupported
Definition Sse.cs:30

References System.Numerics.VectorMath.ConditionalSelectBitwise(), System.Runtime.Intrinsics.Vector128< T >.CreateScalarUnsafe(), System.BitConverter.Int32BitsToSingle(), System.Runtime.Intrinsics.Arm.AdvSimd.IsSupported, System.Runtime.Intrinsics.X86.Sse.IsSupported, and System.BitConverter.SingleToInt32Bits().

Referenced by System.Single.CopySign(), System.Half.CopySign(), and System.MathF.Round().