D
Db
Hello Newsgroup,
Other than creating an application in C# 3.5 SP1, this question is more
mathematical. I have a function that returns the quadrant of an angle (in
radians), as a number, being 1, 2, 3, or 4. My question being is what quadrant is
the positive x-axis in? Or what is it taken to be in? I am assuming Q1.
Given that I test for the condition on;
ar: Angle in radians
x = cos(ar); y = sin(ar)
(x > 0; y > 0) => Q1
(x < 0; y > 0) => Q2
(x < 0; y < 0) => Q3
(x > 0; y < 0) => Q4
The +X-Axis (as you know) is 0.000 Radians, putting it through the cos, sin,
calculation test yields;
x = 1; y = 0, and Googling "what quadrant is positive x axis", yields multitudes
of Geometry, Trigonometry, Cartesian Coordinate, papers none of which test for
0.000 radians. I even was carried away on a lesson on Spherical Coordinates in
3D, man was that spiny....!
Come to think of, are any of the axis (+x, +y, -x, -y) categorised in a quadrant?
My apologies for the off topic.
Thanks and regards,
Other than creating an application in C# 3.5 SP1, this question is more
mathematical. I have a function that returns the quadrant of an angle (in
radians), as a number, being 1, 2, 3, or 4. My question being is what quadrant is
the positive x-axis in? Or what is it taken to be in? I am assuming Q1.
Given that I test for the condition on;
ar: Angle in radians
x = cos(ar); y = sin(ar)
(x > 0; y > 0) => Q1
(x < 0; y > 0) => Q2
(x < 0; y < 0) => Q3
(x > 0; y < 0) => Q4
The +X-Axis (as you know) is 0.000 Radians, putting it through the cos, sin,
calculation test yields;
x = 1; y = 0, and Googling "what quadrant is positive x axis", yields multitudes
of Geometry, Trigonometry, Cartesian Coordinate, papers none of which test for
0.000 radians. I even was carried away on a lesson on Spherical Coordinates in
3D, man was that spiny....!
Come to think of, are any of the axis (+x, +y, -x, -y) categorised in a quadrant?
My apologies for the off topic.
Thanks and regards,