Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marking Matrix3x2, Matrix4x4, Plane, and Quaternion as Intrinsic #41829

Merged
merged 1 commit into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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