mirror of
https://github.com/apple/swift-numerics
synced 2026-11-26 04:57:53 +00:00
Make type casts explicit in quaternion tests
This commit is contained in:
1 parent
4dd08f1c10
commit
2bf3285bde
1 file changed
+2
-2
@@ -32,7 +32,7 @@ final class ArithmeticTests: XCTestCase {
|
||||
|
||||
func testDivision<T: Real & SIMDScalar>(_ type: T.Type) {
|
||||
for value: T in [-3, -2, -1, +1, +2, +3] {
|
||||
let q = Quaternion(value, (value, value, value))
|
||||
let q = Quaternion<T>(value, (value, value, value))
|
||||
XCTAssertEqual(q/q, .one)
|
||||
XCTAssertEqual(0/q, .zero)
|
||||
|
||||
@@ -41,7 +41,7 @@ final class ArithmeticTests: XCTestCase {
|
||||
}
|
||||
|
||||
for q2: T in [-3, -2, -1, +1, +2, +3] {
|
||||
XCTAssertEqual(q.divided(by: q2), q.multiplied(by: 1.0/q2))
|
||||
XCTAssertEqual(q.divided(by: q2), q.multiplied(by: 1/q2))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user