docs: Vector3D.FromAxisAngle parameters updated

This commit is contained in:
2025-10-19 00:15:09 +03:00
parent ede90adbdc
commit 7469c9ab0c

View File

@@ -243,9 +243,9 @@ public readonly struct Quaternion(float x, float y, float z, float w) : IEquatab
/// <param name="axis">The axis of the rotation in <see cref="Vector3D"/>.</param>
/// <param name="angle">The angle in radians.</param>
/// <returns>The rotation <see cref="Quaternion"/> calculated by the given parameters.</returns>
public static Quaternion FromAxisAngle(Vector3D axis, float angle)
public static Quaternion FromAxisAngle(Vector3D axis, float angleInRadian)
{
float halfAngle = angle * .5f;
float halfAngle = angleInRadian * .5f;
float sinHalf = Math.Sin(halfAngle);
return new Quaternion(axis.X * sinHalf, axis.Y * sinHalf, axis.Z * sinHalf, Math.Cos(halfAngle));
}