T toe Member Licensed User Longtime User Jun 22, 2013 #1 Hi, just trying out the trig function and am not getting the correct result, the calculator has the desired result, this is code i copied from vb2008, i am hoping to use most of my vb code. regrads toe
Hi, just trying out the trig function and am not getting the correct result, the calculator has the desired result, this is code i copied from vb2008, i am hoping to use most of my vb code. regrads toe
M MLDev Active Member Licensed User Longtime User Jun 22, 2013 #2 You're using cos instead of cosh on your calculator. I'm getting the correct results of 2.9299942953564550419770514580672 on my calculator. Upvote 0
You're using cos instead of cosh on your calculator. I'm getting the correct results of 2.9299942953564550419770514580672 on my calculator.
T toe Member Licensed User Longtime User Jun 22, 2013 #3 MLDev said: You're using cos instead of cosh on your calculator. I'm getting the correct results of 2.9299942953564550419770514580672 on my calculator. Click to expand... I tried cos: B4X: Parsing code. 0.00 Compiling code. Error Error compiling program. Error description: Unknown member: cos Occurred on line: 66 lLength = lLength / MyMath.Cos(pPitch * (Pi / 180)) Word: cos Do i need a differnt lybrary instead of "MyMath" perhaps? Upvote 0
MLDev said: You're using cos instead of cosh on your calculator. I'm getting the correct results of 2.9299942953564550419770514580672 on my calculator. Click to expand... I tried cos: B4X: Parsing code. 0.00 Compiling code. Error Error compiling program. Error description: Unknown member: cos Occurred on line: 66 lLength = lLength / MyMath.Cos(pPitch * (Pi / 180)) Word: cos Do i need a differnt lybrary instead of "MyMath" perhaps?
T toe Member Licensed User Longtime User Jun 22, 2013 #4 got it B4X: lLength = lLength / Cos (pPitch * (Pi / 180)) -toe :sign0060: ps, do i gotta mark as resolved anywhere? Upvote 0
got it B4X: lLength = lLength / Cos (pPitch * (Pi / 180)) -toe :sign0060: ps, do i gotta mark as resolved anywhere?
M MLDev Active Member Licensed User Longtime User Jun 22, 2013 #5 I think you want this: B4X: ILength = ILength / Cos(pPitch * (cPI / 180)) Upvote 0
M MLDev Active Member Licensed User Longtime User Jun 22, 2013 #6 Great! You can use the constant cPI for pi. Upvote 0
T toe Member Licensed User Longtime User Jun 22, 2013 #7 yep will do, alos worked out i do not need Dim Mymath As MathSupport as it is selected in the lybrary tab. thx -toe Upvote 0
yep will do, alos worked out i do not need Dim Mymath As MathSupport as it is selected in the lybrary tab. thx -toe