From d6c485459ff570e71d3ca9a2195f7da825fd89ff Mon Sep 17 00:00:00 2001 From: James Cotton Date: Sat, 4 Aug 2012 00:31:45 -0500 Subject: [PATCH] Fix error Stac caught in sin_lookup --- flight/Libraries/math/sin_lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flight/Libraries/math/sin_lookup.c b/flight/Libraries/math/sin_lookup.c index 79798b3d4..4444d10d2 100644 --- a/flight/Libraries/math/sin_lookup.c +++ b/flight/Libraries/math/sin_lookup.c @@ -101,9 +101,9 @@ float sin_lookup_deg(float angle) return 0; int i_ang = ((int32_t) angle) % 360; - if (i_ang > 180) // for 180 to 270 deg + if (i_ang >= 180) // for 180 to 360 deg return -sin_table[i_ang - 180]; - else // for 0 to 90 deg + else // for 0 to 179 deg return sin_table[i_ang]; return 0;