apple / swift-numerics

Advanced mathematical types and functions for Swift
Apache License 2.0
1.68k stars 142 forks source link

Fix potential infinite loop in quaternion act #180

Closed markuswntr closed 3 years ago

markuswntr commented 3 years ago

This PR fixes an issue in Quaternion's act(:) method (introduced in #125) which leads to an infinite loop if any of the SIMD lanes of the rotated vector is zero.

CC (and thanks!): @madbat