Оптимизация вычислений / Optimization of computations
This commit is contained in:
parent
7b40d23f19
commit
df827ffe0e
2 changed files with 7 additions and 7 deletions
|
|
@ -100,7 +100,7 @@ namespace BasicGeometry
|
|||
return FP32Angle.GetHalfCircle(unit);
|
||||
}
|
||||
|
||||
return FP32Radians.ToUnits(2.0f * MathF.Acos(s0), unit);
|
||||
return FP32Radians.ToUnits(2.0f * MathF.Acos(this.s0), unit);
|
||||
}
|
||||
|
||||
public readonly void MakeRotationMatrix(out FP32Matrix3x3 matrix)
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ namespace BasicGeometry
|
|||
return FP64Angle.GetHalfCircle(unit);
|
||||
}
|
||||
|
||||
return FP64Radians.ToUnits(2.0 * Math.Acos(s0), unit);
|
||||
return FP64Radians.ToUnits(2.0 * Math.Acos(this.s0), unit);
|
||||
}
|
||||
|
||||
public readonly void MakeRotationMatrix(out FP64Matrix3x3 matrix)
|
||||
|
|
@ -254,12 +254,12 @@ namespace BasicGeometry
|
|||
return;
|
||||
}
|
||||
|
||||
double module = Math.Sqrt(squareModule);
|
||||
double multiplier = Math.Sqrt(1.0 / squareModule);
|
||||
|
||||
this.s0 /= module;
|
||||
this.x1 /= module;
|
||||
this.x2 /= module;
|
||||
this.x3 /= module;
|
||||
this.s0 *= multiplier;
|
||||
this.x1 *= multiplier;
|
||||
this.x2 *= multiplier;
|
||||
this.x3 *= multiplier;
|
||||
}
|
||||
|
||||
public static void Combine(in FP64Versor second, in FP64Versor first, out FP64Versor result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue