|
-
Jun 20th, 2005, 08:43 PM
#1
Thread Starter
Member
-
Jun 20th, 2005, 08:57 PM
#2
Fanatic Member
Re: Coding Tan, Sine, and Cosine
Try using the "Tan", "Sin" and "Cos" commands. I've never had call to use them but know they're there
-
Jun 20th, 2005, 08:58 PM
#3
Re: Coding Tan, Sine, and Cosine
-
Jun 24th, 2005, 10:18 PM
#4
Thread Starter
Member
Re: Coding Tan, Sine, and Cosine
How would i code that for a calculator??
-
Jun 24th, 2005, 10:25 PM
#5
Re: Coding Tan, Sine, and Cosine
Those are the functions you will need.
Example:
VB Code:
txtResult=TAN('your number')
-
Jun 25th, 2005, 05:02 AM
#6
New Member
Re: Coding Tan, Sine, and Cosine
any way to get inverse ratios?
-
Jun 25th, 2005, 11:59 AM
#7
Re: Coding Tan, Sine, and Cosine
 Originally Posted by Netterhead1
any way to get inverse ratios?
VB supports Sin(), Cos(), Tan()
The rest you can get simply as you do in maths:
Cot = 1/Tan(x)
Sec = 1/Cos(x)
Cosec = 1/Sin(x)
Pradeep
-
Jun 25th, 2005, 12:04 PM
#8
Re: Coding Tan, Sine, and Cosine
As in math, all others can be derived from those three functions.
-
Jun 25th, 2005, 12:11 PM
#9
Re: Coding Tan, Sine, and Cosine
Also, we all forgot Atn() which is arctangens.
Look at this page: http://www.engineering.usu.edu/cee/f...s_Examples.htm
it has great examples. It has the examples for working with trigonometry
-
Jun 25th, 2005, 03:58 PM
#10
Re: Coding Tan, Sine, and Cosine
Usually when people talk about inverse functions in trigonometry they are referring to the functions ArcCos, ArcSin and ArcTan.
Since the ArcTan function is built in, here is how to get the other two
VB Code:
Option Explicit
Const Pi = 3.14159265358979
Const PiOn2 = 1.5707963267949
Function ACos(x As Double) As Double
ACos = PiOn2 - Atn(x / Sqr(1 - x ^ 2))
End Function
Function ASin(x As Double) As Double
ASin = Atn(x / Sqr(1 - x ^ 2))
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|