Update AVectorHelper.cs

This commit is contained in:
LDj3SNuD 2018-10-22 23:54:14 +02:00 committed by GitHub
parent 00a2c92ba5
commit 8f1d31dbe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,9 +105,9 @@ namespace ChocolArm64.Instruction
Value < ulong.MinValue ? ulong.MinValue : (ulong)Value;
}
public static double Round(double Value, int Fpcr)
public static double Round(double Value, AThreadState State)
{
switch ((ARoundMode)((Fpcr >> 22) & 3))
switch (State.FPRoundingMode())
{
case ARoundMode.ToNearest: return Math.Round (Value);
case ARoundMode.TowardsPlusInfinity: return Math.Ceiling (Value);
@ -118,9 +118,9 @@ namespace ChocolArm64.Instruction
throw new InvalidOperationException();
}
public static float RoundF(float Value, int Fpcr)
public static float RoundF(float Value, AThreadState State)
{
switch ((ARoundMode)((Fpcr >> 22) & 3))
switch (State.FPRoundingMode())
{
case ARoundMode.ToNearest: return MathF.Round (Value);
case ARoundMode.TowardsPlusInfinity: return MathF.Ceiling (Value);