From 8a2c83342a7ea7a1e2450324fd7e2de87b5cffdc Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 17 Apr 2025 09:33:17 +0200 Subject: [PATCH] Fixes --- src/Direction.cs | 4 ---- src/Matrix.cs | 2 -- src/Quaternion.cs | 3 +-- src/SwingTwist.cs | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Direction.cs b/src/Direction.cs index f479744..6039bd5 100644 --- a/src/Direction.cs +++ b/src/Direction.cs @@ -6,10 +6,6 @@ using Vector3Float = UnityEngine.Vector3; namespace LinearAlgebra { - public class Direction - { -namespace LinearAlgebra { - /// /// A direction in 3D space /// diff --git a/src/Matrix.cs b/src/Matrix.cs index b50eb16..5196d48 100644 --- a/src/Matrix.cs +++ b/src/Matrix.cs @@ -84,8 +84,6 @@ namespace LinearAlgebra { for (int ix = 0; ix < n; ix++) this.data[ix, ix] = v.data[ix]; } - public void FillDiagonal(float f) { - uint n = Math.Min(this.nRows, this.nCols); public void FillDiagonal(float f) { int n = Math.Min(this.nRows, this.nCols); diff --git a/src/Quaternion.cs b/src/Quaternion.cs index cd7e9f4..52dd26b 100644 --- a/src/Quaternion.cs +++ b/src/Quaternion.cs @@ -18,12 +18,11 @@ namespace LinearAlgebra { this.w = w; } +#if UNITY_5_3_OR_NEWER public static Quaternion Reflect(Quaternion q) { return new(-q.x, -q.y, -q.z, q.w); } - -#if UNITY_5_3_OR_NEWER public static Matrix2 ToRotationMatrix(Quaternion q) { float w = q.x, x = q.y, y = q.z, z = q.w; diff --git a/src/SwingTwist.cs b/src/SwingTwist.cs index fe9a1b6..22eb0bb 100644 --- a/src/SwingTwist.cs +++ b/src/SwingTwist.cs @@ -3,8 +3,6 @@ using System.Numerics; using Quaternion = UnityEngine.Quaternion; #endif -namespace LinearAlgebra -{ namespace LinearAlgebra { public class SwingTwist {