H
hiram.upchurch
Hello - I am developing a graphics program for identifying flaws on
aircraft parts. I am trying to provide rotation of the drawing and
the flaws found on the screen. I am able to rotate the image nicely,
but not the flaw marking locations.
Using a trig function of the following: NewXpos = (currX *
cos(Angle)) - (currY * sin(Angle)) and
NewYpos = (currX * (sin(Angle)) + (currY * (cos(Angle)).
Problem comes in with the Sin and Cos functions in vb.Net. When I put
in any angle, I do not get the expected results as from a trig table.
Example: sin(45) = .7071 from the tables but in vb.net it comes back
with 0.85090352453411844 and cos(45) from the tables is also .7071 but
from vb.net it comes back as 0.52532198881772973.
My version info is as follows:
MS Visual Studio 2008 - Version 8.0.50727.762 - SP.050727-7600
MS .Net Frameword Version 2.0.50727
Is this perhaps a bug in vb.net??
Thanks for any and all assistance.
aircraft parts. I am trying to provide rotation of the drawing and
the flaws found on the screen. I am able to rotate the image nicely,
but not the flaw marking locations.
Using a trig function of the following: NewXpos = (currX *
cos(Angle)) - (currY * sin(Angle)) and
NewYpos = (currX * (sin(Angle)) + (currY * (cos(Angle)).
Problem comes in with the Sin and Cos functions in vb.Net. When I put
in any angle, I do not get the expected results as from a trig table.
Example: sin(45) = .7071 from the tables but in vb.net it comes back
with 0.85090352453411844 and cos(45) from the tables is also .7071 but
from vb.net it comes back as 0.52532198881772973.
My version info is as follows:
MS Visual Studio 2008 - Version 8.0.50727.762 - SP.050727-7600
MS .Net Frameword Version 2.0.50727
Is this perhaps a bug in vb.net??
Thanks for any and all assistance.