0

can someone help me with determining what angle is in a quadrant

a user should be able to put in any integer negative or positive and it be able to determine the quadrant

26th Sep 2017, 1:41 PM
Taylor Simmons
Taylor Simmons - avatar
7 Antworten
+ 4
Quadrant 1: 1 - 89 degrees. Quadrant 2: 91 - 179 degrees. Quadrant 3: 181 - 269 degrees. Quadrant 4: 271 - 359 degrees. * If the number is evenly divisible by 90, it is not on a quadrant. Ex/ if (Num % 90 == 0) * If the number is greater than 360, simply subtract it by 360 until it is less than 360. * If the number is smaller than -380, simply add it by 360 until it is greater than -360. ** Scratch that, instead of adding or subtracting just do what @Gordie said. - Then, determine the quadrant based on the numbers given at the top of this comment. Where negative values go in reverse.
26th Sep 2017, 3:31 PM
Rrestoring faith
Rrestoring faith - avatar
0
yeah so I got it all the way to the point where if it's anywhere between 0-360 it will give me the quadrant or "straight angle " but for things like 370 and -370 I got where it will show the base angle of that so 10 degrees for example but from there I can't get it to print to quadrant of that number
26th Sep 2017, 4:26 PM
Taylor Simmons
Taylor Simmons - avatar
0
this is on my phone so idk how
26th Sep 2017, 4:34 PM
Taylor Simmons
Taylor Simmons - avatar
0
code is on my computer
26th Sep 2017, 4:34 PM
Taylor Simmons
Taylor Simmons - avatar