diff --git a/src/DotRecast.Core/Numerics/RcVec2f.cs b/src/DotRecast.Core/Numerics/RcVec2f.cs index 8d0e4a9..e90b3e3 100644 --- a/src/DotRecast.Core/Numerics/RcVec2f.cs +++ b/src/DotRecast.Core/Numerics/RcVec2f.cs @@ -8,7 +8,7 @@ namespace DotRecast.Core.Numerics public float X; public float Y; - public static RcVec2f Zero { get; } = new RcVec2f { X = 0, Y = 0 }; + public static readonly RcVec2f Zero = new RcVec2f { X = 0, Y = 0 }; public RcVec2f(float x, float y) { diff --git a/src/DotRecast.Core/Numerics/RcVec3f.cs b/src/DotRecast.Core/Numerics/RcVec3f.cs index 95f29d9..5e8d86a 100644 --- a/src/DotRecast.Core/Numerics/RcVec3f.cs +++ b/src/DotRecast.Core/Numerics/RcVec3f.cs @@ -27,11 +27,11 @@ namespace DotRecast.Core.Numerics public float Y; public float Z; - public static RcVec3f Zero { get; } = new RcVec3f(0.0f, 0.0f, 0.0f); - public static RcVec3f One { get; } = new RcVec3f(1.0f); - public static RcVec3f UnitX { get; } = new RcVec3f(1.0f, 0.0f, 0.0f); - public static RcVec3f UnitY { get; } = new RcVec3f(0.0f, 1.0f, 0.0f); - public static RcVec3f UnitZ { get; } = new RcVec3f(0.0f, 0.0f, 1.0f); + public static readonly RcVec3f Zero = new RcVec3f(0.0f, 0.0f, 0.0f); + public static readonly RcVec3f One = new RcVec3f(1.0f); + public static readonly RcVec3f UnitX = new RcVec3f(1.0f, 0.0f, 0.0f); + public static readonly RcVec3f UnitY = new RcVec3f(0.0f, 1.0f, 0.0f); + public static readonly RcVec3f UnitZ = new RcVec3f(0.0f, 0.0f, 1.0f); [MethodImpl(MethodImplOptions.AggressiveInlining)] public RcVec3f(float x, float y, float z)