From c5afb70b18630b21708d45cac2c73a89f8fc50af Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sun, 19 Oct 2025 00:12:35 +0300 Subject: [PATCH] docs: vector3d rotate parameters updated --- Engine.Core/Primitives/Vector3D.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine.Core/Primitives/Vector3D.cs b/Engine.Core/Primitives/Vector3D.cs index 71e6152..87f0761 100644 --- a/Engine.Core/Primitives/Vector3D.cs +++ b/Engine.Core/Primitives/Vector3D.cs @@ -198,13 +198,13 @@ public readonly struct Vector3D(float x, float y, float z) : IEquatable new(vector.X * scale.X, vector.Y * scale.Y, vector.Z * scale.Z); /// - /// Rotates a around a normal by the specified angle (in radians). + /// Rotates a around a axis by the specified angle (in radians). /// /// The to rotate. - /// The to rotate around. + /// The to rotate around. /// The angle to rotate by, in radians. /// The rotated . - public static Vector3D Rotate(Vector3D vector, Vector3D normal, float angleInRadian) => vector * Math.Cos(angleInRadian) + Cross(normal, vector) * Math.Sin(angleInRadian) + normal * Dot(normal, vector) * (1f - Math.Cos(angleInRadian)); + public static Vector3D Rotate(Vector3D vector, Vector3D axis, float angleInRadian) => vector * Math.Cos(angleInRadian) + Cross(axis, vector) * Math.Sin(angleInRadian) + axis * Dot(axis, vector) * (1f - Math.Cos(angleInRadian)); /// /// Returns the component-wise minimum of two s.