|
-
Nov 20th, 2001, 05:19 AM
#1
Thread Starter
New Member
trigonometric calculations
how to use vb to calculate sine, cosine and tangent?
-
Nov 20th, 2001, 06:39 AM
#2
PowerPoster
You wont believe how hard it is!!
Sin() Cos() and Tan() functions.
regards
Stuart
-
Nov 21st, 2001, 03:46 AM
#3
Thread Starter
New Member
How do you use the Sin() Cos() and Tan() functions?
-
Nov 21st, 2001, 04:38 AM
#4
Fanatic Member
Info.
All from MSDN:
Sin
Returns a Double specifying the sine of an angle.
Syntax
Sin(number)
The required numberargument is aDouble or any validnumeric expression that expresses an angle in radians.
Remarks
The Sin function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the hypotenuse.
The result lies in the range -1 to 1.
To convert degrees to radians, multiply degrees bypi/180. To convert radians to degrees, multiply radians by 180/pi.
Cos
Returns a Double specifying the cosine of an angle.
Syntax
Cos(number)
The required numberargument is aDouble or any validnumeric expression that expresses an angle in radians.
Remarks
The Cos function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse.
The result lies in the range -1 to 1.
To convert degrees to radians, multiply degrees bypi/180. To convert radians to degrees, multiply radians by 180/pi.
Tan
Returns a Double specifying the tangent of an angle.
Syntax
Tan(number)
The required numberargument is aDouble or any validnumeric expression that expresses an angle in radians.
Remarks
Tan takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.
To convert degrees to radians, multiply degrees bypi/180. To convert radians to degrees, multiply radians by 180/pi.
Digital-X-Treme
Contact me on MSN Messenger: [email protected]
[VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
/ (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]
-
Nov 21st, 2001, 11:47 PM
#5
Thread Starter
New Member
What about inverse tan, sine and cosine functions?
-
Nov 22nd, 2001, 01:24 AM
#6
PowerPoster
well here goes MSDN again.. maybe look at the help files on ur CD
regards
Stuart
Atn Function
Returns aDouble specifying the arctangent of a number.
Syntax
Atn(number)
The required numberargument is a Double or any validnumeric expression.
Remarks
The Atn function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.
The range of the result is -pi/2 to pi/2 radians.
To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.
Note Atn is the inverse trigonometric function of Tan, which takes an angle as its argument and returns the ratio of two sides of a right triangle. Do not confuse Atn with the cotangent, which is the simple inverse of a tangent (1/tangent).
Derived Math Functions
The following is a list of nonintrinsic math functions that can be derived from the intrinsic math functions:
Function Derived equivalents
Secant Sec(X) = 1 / Cos(X)
Cosecant Cosec(X) = 1 / Sin(X)
Cotangent Cotan(X) = 1 / Tan(X)
Inverse Sine Arcsin(X) = Atn(X / Sqr(-X * X + 1))
Inverse Cosine Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
Inverse Secant Arcsec(X) = Atn(X / Sqr(X * X – 1)) + Sgn((X) – 1) * (2 * Atn(1))
Inverse Cosecant Arccosec(X) = Atn(X / Sqr(X * X - 1)) + (Sgn(X) – 1) * (2 * Atn(1))
Inverse Cotangent Arccotan(X) = Atn(X) + 2 * Atn(1)
Hyperbolic Sine HSin(X) = (Exp(X) – Exp(-X)) / 2
Hyperbolic Cosine HCos(X) = (Exp(X) + Exp(-X)) / 2
Hyperbolic Tangent HTan(X) = (Exp(X) – Exp(-X)) / (Exp(X) + Exp(-X))
Hyperbolic Secant HSec(X) = 2 / (Exp(X) + Exp(-X))
Hyperbolic Cosecant HCosec(X) = 2 / (Exp(X) – Exp(-X))
Hyperbolic Cotangent HCotan(X) = (Exp(X) + Exp(-X)) / (Exp(X) – Exp(-X))
Inverse Hyperbolic Sine HArcsin(X) = Log(X + Sqr(X * X + 1))
Inverse Hyperbolic Cosine HArccos(X) = Log(X + Sqr(X * X – 1))
Inverse Hyperbolic Tangent HArctan(X) = Log((1 + X) / (1 – X)) / 2
Inverse Hyperbolic Secant HArcsec(X) = Log((Sqr(-X * X + 1) + 1) / X)
Inverse Hyperbolic Cosecant HArccosec(X) = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)
Inverse Hyperbolic Cotangent HArccotan(X) = Log((X + 1) / (X – 1)) / 2
Logarithm to base N LogN(X) = Log(X) / Log(N)
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
|