We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c142bce commit e7c68b7Copy full SHA for e7c68b7
Sources/QuaternionModule/ImaginaryHelper.swift
@@ -34,7 +34,13 @@ extension SIMD3 where Scalar: FloatingPoint {
34
/// The ∞-norm of the value (`max(abs(x), abs(y), abs(z))`).
35
@usableFromInline @inline(__always)
36
internal var magnitude: Scalar {
37
- max()
+ Swift.max(x.magnitude, y.magnitude, z.magnitude)
38
+ }
39
+
40
+ /// The 1-norm of the value (`abs(x) + abs(y) + abs(z))`).
41
+ @usableFromInline @inline(__always)
42
+ internal var oneNorm: Scalar {
43
+ x.magnitude + y.magnitude + z.magnitude
44
}
45
46
/// The Euclidean norm (a.k.a. 2-norm, `sqrt(x*x + y*y + z*z)`).
0 commit comments