-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #325 from NoiseStudio/feature/324/mathematics-type…
…s-shortcuts Add mathematics types shortcuts
- Loading branch information
Showing
48 changed files
with
2,435 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
using NoiseEngine.Components; | ||
using NoiseEngine.Mathematics; | ||
|
||
namespace NoiseEngine.Tests.Components; | ||
|
||
public class TransformComponentTest { | ||
|
||
[Fact] | ||
public void EqualsTest() { | ||
Assert.Equal(new TransformComponent(Vector3<float>.Zero), new TransformComponent(Vector3<float>.Zero)); | ||
Assert.NotEqual(new TransformComponent(Vector3<float>.Zero), new TransformComponent(Vector3<float>.One)); | ||
Assert.Equal(new TransformComponent(pos3.Zero), new TransformComponent(pos3.Zero)); | ||
Assert.NotEqual(new TransformComponent(pos3.Zero), new TransformComponent(pos3.One)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,60 @@ | ||
global using Xunit; | ||
|
||
global using byte2 = NoiseEngine.Mathematics.Vector2<byte>; | ||
global using byte3 = NoiseEngine.Mathematics.Vector3<byte>; | ||
global using byte4 = NoiseEngine.Mathematics.Vector4<byte>; | ||
|
||
global using sbyte2 = NoiseEngine.Mathematics.Vector2<sbyte>; | ||
global using sbyte3 = NoiseEngine.Mathematics.Vector3<sbyte>; | ||
global using sbyte4 = NoiseEngine.Mathematics.Vector4<sbyte>; | ||
|
||
global using decimal2 = NoiseEngine.Mathematics.Vector2<decimal>; | ||
global using decimal3 = NoiseEngine.Mathematics.Vector3<decimal>; | ||
global using decimal4 = NoiseEngine.Mathematics.Vector4<decimal>; | ||
|
||
global using float2 = NoiseEngine.Mathematics.Vector2<float>; | ||
global using float3 = NoiseEngine.Mathematics.Vector3<float>; | ||
global using float4 = NoiseEngine.Mathematics.Vector4<float>; | ||
|
||
global using double2 = NoiseEngine.Mathematics.Vector2<double>; | ||
global using double3 = NoiseEngine.Mathematics.Vector3<double>; | ||
global using double4 = NoiseEngine.Mathematics.Vector4<double>; | ||
|
||
global using int2 = NoiseEngine.Mathematics.Vector2<int>; | ||
global using int3 = NoiseEngine.Mathematics.Vector3<int>; | ||
global using int4 = NoiseEngine.Mathematics.Vector4<int>; | ||
|
||
global using uint2 = NoiseEngine.Mathematics.Vector2<uint>; | ||
global using uint3 = NoiseEngine.Mathematics.Vector3<uint>; | ||
global using uint4 = NoiseEngine.Mathematics.Vector4<uint>; | ||
|
||
global using nint2 = NoiseEngine.Mathematics.Vector2<nint>; | ||
global using nint3 = NoiseEngine.Mathematics.Vector3<nint>; | ||
global using nint4 = NoiseEngine.Mathematics.Vector4<nint>; | ||
|
||
global using nuint2 = NoiseEngine.Mathematics.Vector2<nuint>; | ||
global using nuint3 = NoiseEngine.Mathematics.Vector3<nuint>; | ||
global using nuint4 = NoiseEngine.Mathematics.Vector4<nuint>; | ||
|
||
global using long2 = NoiseEngine.Mathematics.Vector2<long>; | ||
global using long3 = NoiseEngine.Mathematics.Vector3<long>; | ||
global using long4 = NoiseEngine.Mathematics.Vector4<long>; | ||
|
||
global using ulong2 = NoiseEngine.Mathematics.Vector2<ulong>; | ||
global using ulong3 = NoiseEngine.Mathematics.Vector3<ulong>; | ||
global using ulong4 = NoiseEngine.Mathematics.Vector4<ulong>; | ||
|
||
global using short2 = NoiseEngine.Mathematics.Vector2<short>; | ||
global using short3 = NoiseEngine.Mathematics.Vector3<short>; | ||
global using short4 = NoiseEngine.Mathematics.Vector4<short>; | ||
|
||
global using ushort2 = NoiseEngine.Mathematics.Vector2<ushort>; | ||
global using ushort3 = NoiseEngine.Mathematics.Vector3<ushort>; | ||
global using ushort4 = NoiseEngine.Mathematics.Vector4<ushort>; | ||
|
||
#pragma warning disable CS8981 | ||
global using pos = NoiseEngine.Mathematics.Position; | ||
#pragma warning restore CS8981 | ||
global using pos2 = NoiseEngine.Mathematics.Vector2<NoiseEngine.Mathematics.Position>; | ||
global using pos3 = NoiseEngine.Mathematics.Vector3<NoiseEngine.Mathematics.Position>; | ||
global using pos4 = NoiseEngine.Mathematics.Vector4<NoiseEngine.Mathematics.Position>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Numerics; | ||
|
||
namespace NoiseEngine.Mathematics.Helpers; | ||
|
||
internal static class AdditiveIdentityHelper<TSelf, TResult> where TSelf : IAdditiveIdentity<TSelf, TResult> { | ||
|
||
public static TResult AdditiveIdentity => TSelf.AdditiveIdentity; | ||
|
||
} |
Oops, something went wrong.