@@ -37,7 +37,7 @@ import RealModule
37
37
/// important to be aware that, when used this way, any quaternion and its
38
38
/// negation represent the same transformation, but they do not compare equal
39
39
/// using `==` because they are not the same quaternion.
40
- /// You can compare quaternions as 3D transformations using `transformEquals( )`.
40
+ /// You can compare quaternions as 3D transformations using `equals(as3DTransform: )`.
41
41
public struct Quaternion < RealType> where RealType: Real & SIMDScalar {
42
42
43
43
/// The components of the 4-dimensional vector space of the quaternion.
@@ -401,7 +401,7 @@ extension Quaternion: Hashable {
401
401
/// important to be aware that, when used this way, any quaternion and its
402
402
/// negation represent the same transformation, but they do not compare
403
403
/// equal using `==` because they are not the same quaternion. You can
404
- /// compare quaternions as 3D transformations using `transformEquals( )`.
404
+ /// compare quaternions as 3D transformations using `equals(as3DTransform: )`.
405
405
@_transparent
406
406
public static func == ( lhs: Quaternion , rhs: Quaternion ) -> Bool {
407
407
// Identify all numbers with either component non-finite as a single "point at infinity".
@@ -413,13 +413,16 @@ extension Quaternion: Hashable {
413
413
return lhs. components == rhs. components
414
414
}
415
415
416
- /// Transformation equality comparison
416
+ /// Returns a Boolean value indicating whether the 3D transformation of the
417
+ /// two quaternions are equal.
417
418
///
418
- /// Returns a Boolean value indicating whether the 3D transformations of this
419
- /// quaternion equals the 3D transformation of `other`.
419
+ /// Use this method to test for equality of the 3D transformation properties
420
+ /// of quaternions; where for any quaternion `q`, its negation represent the
421
+ /// same 3D transformation; i.e. `q.equals(as3DTransform: q)` as well as
422
+ /// `q.equals(as3DTransform: -q)` are both `true`.
420
423
///
421
424
/// - Parameter other: The value to compare.
422
- /// - Returns: True if the transformation of this quaternion equals `other`.
425
+ /// - Returns: True if the 3D transformation of this quaternion equals `other`.
423
426
@_transparent
424
427
public func equals( as3DTransform other: Quaternion ) -> Bool {
425
428
// Identify all numbers with either component non-finite as a single "point at infinity".
0 commit comments