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.