Defines many trigonometric functions not defined by the core Perl, plus the constant pi and some additional functions for converting angles. For example:
The following functions are defined. A slash (use Math::Trig; $x = tan(0.9); $halfpi = pi/2;
/
) between two functions
means the values are aliases.acsc/acosec
, asec
, acot/acotan
Arcus cofunctions of sine, cosine, and tangent
acsch/acosech
, asech
, acoth/acotanh
Arcus cofunctions of hyperbolic sine, cosine, and tangent
asin
, acos
, atan
Arcus (inverse) functions of sine, cosine, and tangent
asinh
, acosh
, atanh
Arcus functions of hyperbolic sine, cosine, and tangent
atan2(y, x)
Principal value of arc tangent of y/x
csc/cosec
, sec
, cot/cotan
Cofunctions of sine, cosine, and tangent
csch/cosech
, sech
, coth/cotanh
Cofunctions of hyperbolic sine, cosine, and tangent
deg2rad
Degrees to radians
deg2grad
Degrees to gradians
grad2deg
Gradians to degrees
grad2rad
Gradians to radians
pi
The trigonometric constant pi
rad2deg
Radians to degrees
rad2grad
Radians to gradians
sinh
, cosh
, tanh
Hyperbolic sine, cosine, and tangent
tan
Tangent
Copyright © 2001 O'Reilly & Associates. All rights reserved.