private void CheckllAngleBetween(Vector3 axis, float originalAngle) { Quaternion rotation1 = Quaternion.CreateFromAxisAngle(axis, 0); Quaternion rotation2 = Quaternion.CreateFromAxisAngle(axis, ToRadians(originalAngle)); double deducedAngle = FromLslFloat(m_lslApi.llAngleBetween(ToLslQuaternion(rotation2), ToLslQuaternion(rotation1))); Assert.Greater(deducedAngle, ToRadians(originalAngle) - ANGLE_ACCURACY_IN_RADIANS); Assert.Less(deducedAngle, ToRadians(originalAngle) + ANGLE_ACCURACY_IN_RADIANS); }
private void CheckllAngleBetween(Vector3 axis, float originalAngle, float denorm1, float denorm2) { Quaternion rotation1 = Quaternion.CreateFromAxisAngle(axis, 0); Quaternion rotation2 = Quaternion.CreateFromAxisAngle(axis, ToRadians(originalAngle)); rotation1 *= denorm1; rotation2 *= denorm2; double deducedAngle = FromLslFloat(m_lslApi.llAngleBetween(ToLslQuaternion(rotation2), ToLslQuaternion(rotation1))); Assert.That(deducedAngle, Is.EqualTo(ToRadians(originalAngle)).Within(ANGLE_ACCURACY_IN_RADIANS), "TestllAngleBetween check fail"); }