atan2: tweak for speed

This commit is contained in:
Robert Jördens 2021-05-06 10:10:59 +02:00
parent c6965bd8e0
commit 21ab988239

View File

@ -77,6 +77,8 @@ pub fn atan2(y: i32, x: i32) -> i32 {
if sign.1 { if sign.1 {
angle = angle.wrapping_neg(); angle = angle.wrapping_neg();
// Negation ends up in slightly faster assembly
// angle = !angle;
} }
angle angle