Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
edmond-chow authored Oct 29, 2023
1 parent 6669e64 commit 5fdce9e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 43 deletions.
12 changes: 6 additions & 6 deletions C#/Complex.rar/Complex/Complex Testing Console/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
using static Cmplx.MainType.ComplexModule;
internal static class Mod
{
internal static void MultipleOp<R>(string LeftValue, string RightValue, Func<Complex, Complex, R> Subroutine)
internal static void Multiple<R>(string LeftValue, string RightValue, Func<Complex, Complex, R> Subroutine)
{
if (LeftValue == RightValue)
{
Complex Union = GetInstance(Base.Input("Union = "));
Complex Value = GetInstance(Base.Input("Value = "));
object Result = Subroutine.Invoke(Union, Value);
if (Result.GetType() == typeof(Cmplx.BaseType.Vector1D)) { Result = (Complex)Result; }
if (Result is Cmplx.BaseType.Vector1D V) { Result = new Complex(0, V); }
Base.Output(Result.ToModuleString());
}
}
Expand Down Expand Up @@ -159,10 +159,10 @@ internal static void Load()
Basic(Line, "inverse", Inverse);
Basic(Line, "exp", Exp);
BasicWith(Line, "ln", Ln);
MultipleOp(Line, "dot", Dot);
MultipleOp(Line, "outer", Outer);
MultipleOp(Line, "even", Even);
MultipleOp(Line, "cross", Cross);
Multiple(Line, "dot", Dot);
Multiple(Line, "outer", Outer);
Multiple(Line, "even", Even);
Multiple(Line, "cross", Cross);
/****/
Tri(Line, "sin", Sin);
Tri(Line, "cos", Cos);
Expand Down
12 changes: 6 additions & 6 deletions C#/Complex.rar/Complex/Complex Testing Console/Module2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
using static Cmplx2.MainType.QuaternionModule;
internal static class Mod2
{
internal static void MultipleOp<R>(string LeftValue, string RightValue, Func<Quaternion, Quaternion, R> Subroutine)
internal static void Multiple<R>(string LeftValue, string RightValue, Func<Quaternion, Quaternion, R> Subroutine)
{
if (LeftValue == RightValue)
{
Quaternion Union = GetInstance(Base.Input("Union = "));
Quaternion Value = GetInstance(Base.Input("Value = "));
object Result = Subroutine.Invoke(Union, Value);
if (Result.GetType() == typeof(Cmplx2.BaseType.Vector3D)) { Result = (Quaternion)Result; }
if (Result is Cmplx2.BaseType.Vector3D V) { Result = new Quaternion(0, V); }
Base.Output(Result.ToModuleString());
}
}
Expand Down Expand Up @@ -159,10 +159,10 @@ internal static void Load()
Basic(Line, "inverse", Inverse);
Basic(Line, "exp", Exp);
BasicWith(Line, "ln", Ln);
MultipleOp(Line, "dot", Dot);
MultipleOp(Line, "outer", Outer);
MultipleOp(Line, "even", Even);
MultipleOp(Line, "cross", Cross);
Multiple(Line, "dot", Dot);
Multiple(Line, "outer", Outer);
Multiple(Line, "even", Even);
Multiple(Line, "cross", Cross);
/****/
Tri(Line, "sin", Sin);
Tri(Line, "cos", Cos);
Expand Down
12 changes: 6 additions & 6 deletions C#/Complex.rar/Complex/Complex Testing Console/Module3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
using static Cmplx3.MainType.OctonionModule;
internal static class Mod3
{
internal static void MultipleOp<R>(string LeftValue, string RightValue, Func<Octonion, Octonion, R> Subroutine)
internal static void Multiple<R>(string LeftValue, string RightValue, Func<Octonion, Octonion, R> Subroutine)
{
if (LeftValue == RightValue)
{
Octonion Union = GetInstance(Base.Input("Union = "));
Octonion Value = GetInstance(Base.Input("Value = "));
object Result = Subroutine.Invoke(Union, Value);
if (Result.GetType() == typeof(Cmplx3.BaseType.Vector7D)) { Result = (Octonion)Result; }
if (Result is Cmplx3.BaseType.Vector7D V) { Result = new Octonion(0, V); }
Base.Output(Result.ToModuleString());
}
}
Expand Down Expand Up @@ -159,10 +159,10 @@ internal static void Load()
Basic(Line, "inverse", Inverse);
Basic(Line, "exp", Exp);
BasicWith(Line, "ln", Ln);
MultipleOp(Line, "dot", Dot);
MultipleOp(Line, "outer", Outer);
MultipleOp(Line, "even", Even);
MultipleOp(Line, "cross", Cross);
Multiple(Line, "dot", Dot);
Multiple(Line, "outer", Outer);
Multiple(Line, "even", Even);
Multiple(Line, "cross", Cross);
/****/
Tri(Line, "sin", Sin);
Tri(Line, "cos", Cos);
Expand Down
12 changes: 6 additions & 6 deletions C#/Complex.rar/Complex/Sedenion Testing Console/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
using static Cmplx.MainType.ComplexModule;
internal static class Mod
{
internal static void MultipleOp<R>(string LeftValue, string RightValue, Func<Complex, Complex, R> Subroutine)
internal static void Multiple<R>(string LeftValue, string RightValue, Func<Complex, Complex, R> Subroutine)
{
if (LeftValue == RightValue)
{
Complex Union = GetInstance(Base.Input("Union = "));
Complex Value = GetInstance(Base.Input("Value = "));
object Result = Subroutine.Invoke(Union, Value);
if (Result.GetType() == typeof(Cmplx.BaseType.Vector1D)) { Result = (Complex)Result; }
if (Result is Cmplx.BaseType.Vector1D V) { Result = new Complex(0, V); }
Base.Output(Result.ToModuleString());
}
}
Expand Down Expand Up @@ -159,10 +159,10 @@ internal static void Load()
Basic(Line, "inverse", Inverse);
Basic(Line, "exp", Exp);
BasicWith(Line, "ln", Ln);
MultipleOp(Line, "dot", Dot);
MultipleOp(Line, "outer", Outer);
MultipleOp(Line, "even", Even);
MultipleOp(Line, "cross", Cross);
Multiple(Line, "dot", Dot);
Multiple(Line, "outer", Outer);
Multiple(Line, "even", Even);
Multiple(Line, "cross", Cross);
/****/
Tri(Line, "sin", Sin);
Tri(Line, "cos", Cos);
Expand Down
12 changes: 6 additions & 6 deletions C#/Complex.rar/Complex/Sedenion Testing Console/Module2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
using static Cmplx2.MainType.QuaternionModule;
internal static class Mod2
{
internal static void MultipleOp<R>(string LeftValue, string RightValue, Func<Quaternion, Quaternion, R> Subroutine)
internal static void Multiple<R>(string LeftValue, string RightValue, Func<Quaternion, Quaternion, R> Subroutine)
{
if (LeftValue == RightValue)
{
Quaternion Union = GetInstance(Base.Input("Union = "));
Quaternion Value = GetInstance(Base.Input("Value = "));
object Result = Subroutine.Invoke(Union, Value);
if (Result.GetType() == typeof(Cmplx2.BaseType.Vector3D)) { Result = (Quaternion)Result; }
if (Result is Cmplx2.BaseType.Vector3D V) { Result = new Quaternion(0, V); }
Base.Output(Result.ToModuleString());
}
}
Expand Down Expand Up @@ -159,10 +159,10 @@ internal static void Load()
Basic(Line, "inverse", Inverse);
Basic(Line, "exp", Exp);
BasicWith(Line, "ln", Ln);
MultipleOp(Line, "dot", Dot);
MultipleOp(Line, "outer", Outer);
MultipleOp(Line, "even", Even);
MultipleOp(Line, "cross", Cross);
Multiple(Line, "dot", Dot);
Multiple(Line, "outer", Outer);
Multiple(Line, "even", Even);
Multiple(Line, "cross", Cross);
/****/
Tri(Line, "sin", Sin);
Tri(Line, "cos", Cos);
Expand Down
12 changes: 6 additions & 6 deletions C#/Complex.rar/Complex/Sedenion Testing Console/Module3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
using static Cmplx3.MainType.OctonionModule;
internal static class Mod3
{
internal static void MultipleOp<R>(string LeftValue, string RightValue, Func<Octonion, Octonion, R> Subroutine)
internal static void Multiple<R>(string LeftValue, string RightValue, Func<Octonion, Octonion, R> Subroutine)
{
if (LeftValue == RightValue)
{
Octonion Union = GetInstance(Base.Input("Union = "));
Octonion Value = GetInstance(Base.Input("Value = "));
object Result = Subroutine.Invoke(Union, Value);
if (Result.GetType() == typeof(Cmplx3.BaseType.Vector7D)) { Result = (Octonion)Result; }
if (Result is Cmplx3.BaseType.Vector7D V) { Result = new Octonion(0, V); }
Base.Output(Result.ToModuleString());
}
}
Expand Down Expand Up @@ -159,10 +159,10 @@ internal static void Load()
Basic(Line, "inverse", Inverse);
Basic(Line, "exp", Exp);
BasicWith(Line, "ln", Ln);
MultipleOp(Line, "dot", Dot);
MultipleOp(Line, "outer", Outer);
MultipleOp(Line, "even", Even);
MultipleOp(Line, "cross", Cross);
Multiple(Line, "dot", Dot);
Multiple(Line, "outer", Outer);
Multiple(Line, "even", Even);
Multiple(Line, "cross", Cross);
/****/
Tri(Line, "sin", Sin);
Tri(Line, "cos", Cos);
Expand Down
13 changes: 6 additions & 7 deletions C#/Complex.rar/Complex/Sedenion Testing Console/SedenionMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
using static Seden.Sedenion;
internal static class SedenionMod
{
internal static void MultipleOp<R>(string LeftValue, string RightValue, Func<Sedenion, Sedenion, R> Subroutine)
internal static void Multiple<R>(string LeftValue, string RightValue, Func<Sedenion, Sedenion, R> Subroutine)
{
if (LeftValue == RightValue)
{
Sedenion Union = GetInstance(Base.Input("Union = "));
Sedenion Value = GetInstance(Base.Input("Value = "));
object Result = Subroutine.Invoke(Union, Value);
Base.Output(Result.ToModuleString());
Base.Output(Subroutine.Invoke(Union, Value).ToModuleString());
}
}
internal static void Op<R>(string LeftValue, string RightValue, Func<Sedenion, Sedenion, R> Subroutine)
Expand Down Expand Up @@ -167,10 +166,10 @@ internal static void Load()
Basic(Line, "inverse", Inverse);
Basic(Line, "exp", Exp);
BasicWith(Line, "ln", Ln);
MultipleOp(Line, "dot", Dot);
MultipleOp(Line, "outer", Outer);
MultipleOp(Line, "even", Even);
MultipleOp(Line, "cross", Cross);
Multiple(Line, "dot", Dot);
Multiple(Line, "outer", Outer);
Multiple(Line, "even", Even);
Multiple(Line, "cross", Cross);
/****/
Tri(Line, "sin", Sin);
Tri(Line, "cos", Cos);
Expand Down

0 comments on commit 5fdce9e

Please sign in to comment.