From acc1a17fa451f325daaa09eb6d46a98a225f6e6b Mon Sep 17 00:00:00 2001 From: ikpil Date: Wed, 7 Jun 2023 15:06:23 +0900 Subject: [PATCH] added default RcVec3f --- src/DotRecast.Core/RcVec3f.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/DotRecast.Core/RcVec3f.cs b/src/DotRecast.Core/RcVec3f.cs index 38ce157..0af129c 100644 --- a/src/DotRecast.Core/RcVec3f.cs +++ b/src/DotRecast.Core/RcVec3f.cs @@ -27,8 +27,11 @@ namespace DotRecast.Core public float y; public float z; - public static RcVec3f Zero { get; } = new RcVec3f(0, 0, 0); - public static RcVec3f Up { get; } = new RcVec3f(0, 1, 0); + 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 RcVec3f Of(float[] f) { @@ -227,7 +230,7 @@ namespace DotRecast.Core y = Math.Min(y, @in[i + 1]); z = Math.Min(z, @in[i + 2]); } - + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Min(RcVec3f b) {