Skip to content

Commit

Permalink
Marking Matrix3x2, Matrix4x4, Plane, and Quaternion as Intrinsic (#41829
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tannergooding authored Sep 4, 2020
1 parent 5463301 commit a6aac1f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Globalization;
using System.Runtime.CompilerServices;

namespace System.Numerics
{
/// <summary>
/// A structure encapsulating a 3x2 matrix.
/// </summary>
[Intrinsic]
public struct Matrix3x2 : IEquatable<Matrix3x2>
{
private const float RotationEpsilon = 0.001f * MathF.PI / 180f; // 0.1% of a degree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace System.Numerics
/// <summary>
/// A structure encapsulating a 4x4 matrix.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
[Intrinsic]
public struct Matrix4x4 : IEquatable<Matrix4x4>
{
private const float BillboardEpsilon = 1e-4f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace System.Numerics
/// <summary>
/// A structure encapsulating a 3D Plane
/// </summary>
[Intrinsic]
public struct Plane : IEquatable<Plane>
{
private const float NormalizeEpsilon = 1.192092896e-07f; // smallest such that 1.0+NormalizeEpsilon != 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Globalization;
using System.Runtime.CompilerServices;

namespace System.Numerics
{
/// <summary>
/// A structure encapsulating a four-dimensional vector (x,y,z,w),
/// which is used to efficiently rotate an object about the (x,y,z) vector by the angle theta, where w = cos(theta/2).
/// </summary>
[Intrinsic]
public struct Quaternion : IEquatable<Quaternion>
{
private const float SlerpEpsilon = 1e-6f;
Expand Down

0 comments on commit a6aac1f

Please sign in to comment.