From 7e794373f45c942cd3f108b32afe743cf52cf777 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Thu, 17 Dec 2020 14:21:39 -0800 Subject: [PATCH] atan2: fix output range description --- dsp/src/trig.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dsp/src/trig.rs b/dsp/src/trig.rs index 13ce844..9873d7e 100644 --- a/dsp/src/trig.rs +++ b/dsp/src/trig.rs @@ -18,9 +18,9 @@ include!(concat!(env!("OUT_DIR"), "/cossin_table.rs")); /// # Returns /// /// The angle between the x-axis and the ray to the point (x,y). The -/// result range is from i32::MIN+1 to i32::MAX, where i32::MIN+1 -/// corresponds to an angle of -pi and i32::MAX corresponds to an -/// angle of +pi. +/// result range is from i32::MIN to i32::MAX, where i32::MIN +/// represents -pi and, equivalently, +pi. i32::MAX represents one +/// count less than +pi. pub fn atan2(y: i32, x: i32) -> i32 { let mut y = y >> 16; let mut x = x >> 16;