Большая реорганизация проекта
This commit is contained in:
parent
233c027d46
commit
f3b0232dd4
35 changed files with 705 additions and 593 deletions
|
|
@ -6,14 +6,14 @@ using BasicGeometry;
|
|||
|
||||
public static class Program
|
||||
{
|
||||
private static FP32Versor[] AllocateVersors(int amount)
|
||||
private static VersorFP32[] AllocateVersors(int amount)
|
||||
{
|
||||
return new FP32Versor[amount];
|
||||
return new VersorFP32[amount];
|
||||
}
|
||||
|
||||
private static FP32Versor[] MakeZeroVersors(int amount)
|
||||
private static VersorFP32[] MakeZeroVersors(int amount)
|
||||
{
|
||||
FP32Versor[] versors = AllocateVersors(amount);
|
||||
VersorFP32[] versors = AllocateVersors(amount);
|
||||
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
|
|
@ -23,15 +23,15 @@ public static class Program
|
|||
return versors;
|
||||
}
|
||||
|
||||
private static FP32Versor[] MakeRandomVersors(int amount)
|
||||
private static VersorFP32[] MakeRandomVersors(int amount)
|
||||
{
|
||||
Random randomizer = new Random(Environment.TickCount);
|
||||
|
||||
FP32Versor[] versors = AllocateVersors(amount);
|
||||
VersorFP32[] versors = AllocateVersors(amount);
|
||||
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
versors[i] = new FP32Versor(
|
||||
versors[i] = new VersorFP32(
|
||||
randomizer.NextSingle(),
|
||||
randomizer.NextSingle(),
|
||||
randomizer.NextSingle(),
|
||||
|
|
@ -42,7 +42,7 @@ public static class Program
|
|||
return versors;
|
||||
}
|
||||
|
||||
private static void PrintVersor(in FP32Versor versor)
|
||||
private static void PrintVersor(in VersorFP32 versor)
|
||||
{
|
||||
Console.WriteLine("({0}, {1}, {2}, {3})", versor.GetScalar(), versor.GetX1(), versor.GetX2(), versor.GetX3());
|
||||
}
|
||||
|
|
@ -51,9 +51,9 @@ public static class Program
|
|||
{
|
||||
int amount = 1000000;
|
||||
|
||||
FP32Versor[] versors1 = MakeRandomVersors(amount);
|
||||
FP32Versor[] versors2 = MakeRandomVersors(amount);
|
||||
FP32Versor[] results = MakeZeroVersors(amount);
|
||||
VersorFP32[] versors1 = MakeRandomVersors(amount);
|
||||
VersorFP32[] versors2 = MakeRandomVersors(amount);
|
||||
VersorFP32[] results = MakeZeroVersors(amount);
|
||||
|
||||
long start, end;
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ public static class Program
|
|||
{
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
FP32Versor.Combine(versors1[i], versors2[i], out results[i]);
|
||||
VersorFP32.Combine(versors1[i], versors2[i], out results[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue