Click to See Complete Forum and Search --> : trigonometric calculations
enyuluo
Nov 20th, 2001, 04:19 AM
how to use vb to calculate sine, cosine and tangent?
beachbum
Nov 20th, 2001, 05:39 AM
You wont believe how hard it is!! :D
Sin() Cos() and Tan() functions.
regards
Stuart
enyuluo
Nov 21st, 2001, 02:46 AM
How do you use the Sin() Cos() and Tan() functions?
[Digital-X-Treme]
Nov 21st, 2001, 03:38 AM
All from MSDN:
SinReturns 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.
CosReturns 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.
TanReturns 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.
enyuluo
Nov 21st, 2001, 10:47 PM
What about inverse tan, sine and cosine functions?
beachbum
Nov 22nd, 2001, 12:24 AM
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)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.