SupportTeam Report post Posted 09/02/2005 12:20 AM Daniel wrote: Do you have any idea why vbscript's returned value for Cos would be different than the rest of the world's? When I use a calculator, online, microsoft's, or traditional, I get Cos(.59722) = .99994 However, voiceguide is receiving Cos(.59722)=.89670 (I rounded the values involved) I verified that it was the Cos function that was causing this to happen. I verified that the values going into the Cos function were what they should be. Would you have any idea why this would happen? Perhaps you know of a way to test the value outside of voiceguide? I don't think the trace would be of any value because once the vbscript starts, it doesn't seem to leave any traces other than it's entry and exit. Share this post Link to post
SupportTeam Report post Posted 09/02/2005 12:27 AM The Microsoft calculator takes COS input in Degrees, while VBScript takes input in Radians. Radian = Angle * 3.14159265 / 180.0 a sample test VBScript showing this is attached - just download and double-click it and the script will run. The VBScript's that VoiceGuide runs are available for viewing as well. See bottom of the Help file's page on VBScript module. ( online copy here: http://www.voiceguide.com/vghelp/html/modVbs.htm ) CosTest.vbs Share this post Link to post
Guest Guest Report post Posted 09/02/2005 10:40 PM Ok, I see. Doh, that was dumb of me. So I was getting the right value in vbscript because I had already converted it to radians, thinking that's what the world used. Share this post Link to post
ktruk Report post Posted 09/04/2005 01:07 PM WOW! Someone using a trigonometry in a CTI script !! Awesome. ;-) And qudos to support for spotting radian base - cool !! Share this post Link to post