File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
modules/mono/glue/GodotSharp/GodotSharp/Core Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ public readonly bool IsFinite()
338338 /// <returns>A <see langword="bool"/> for whether the quaternion is normalized or not.</returns>
339339 public readonly bool IsNormalized ( )
340340 {
341- return Mathf . Abs ( LengthSquared ( ) - 1 ) <= Mathf . Epsilon ;
341+ return Mathf . IsEqualApprox ( LengthSquared ( ) , 1 , Mathf . Epsilon ) ;
342342 }
343343
344344 public readonly Quaternion Log ( )
Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ public readonly bool IsFinite()
370370 /// <returns>A <see langword="bool"/> indicating whether or not the vector is normalized.</returns>
371371 public readonly bool IsNormalized ( )
372372 {
373- return Mathf . Abs ( LengthSquared ( ) - 1.0f ) < Mathf . Epsilon ;
373+ return Mathf . IsEqualApprox ( LengthSquared ( ) , 1 , Mathf . Epsilon ) ;
374374 }
375375
376376 /// <summary>
Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ public readonly bool IsFinite()
368368 /// <returns>A <see langword="bool"/> indicating whether or not the vector is normalized.</returns>
369369 public readonly bool IsNormalized ( )
370370 {
371- return Mathf . Abs ( LengthSquared ( ) - 1.0f ) < Mathf . Epsilon ;
371+ return Mathf . IsEqualApprox ( LengthSquared ( ) , 1 , Mathf . Epsilon ) ;
372372 }
373373
374374 /// <summary>
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ public readonly bool IsFinite()
318318 /// <returns>A <see langword="bool"/> indicating whether or not the vector is normalized.</returns>
319319 public readonly bool IsNormalized ( )
320320 {
321- return Mathf . Abs ( LengthSquared ( ) - 1.0f ) < Mathf . Epsilon ;
321+ return Mathf . IsEqualApprox ( LengthSquared ( ) , 1 , Mathf . Epsilon ) ;
322322 }
323323
324324 /// <summary>
You can’t perform that action at this time.
0 commit comments