Module piecad.trigonometry
Trigonometry functions that use and return degrees.
They also take pains to make sure commonly used angles that should come out exact, DO come out exact.
Functions
- def acos(cosVal: float) ‑> float
- 
Expand source codedef acos(cosVal: float) -> float: "ArcCosine of cosVal returning angle in degrees." return rad_to_deg(_math.acos(cosVal))ArcCosine of cosVal returning angle in degrees. 
- def acosh(cosVal: float) ‑> float
- 
Expand source codedef acosh(cosVal: float) -> float: "ArcCosine of hyperbolic cosVal returning angle in degrees." return rad_to_deg(_math.acosh(cosVal))ArcCosine of hyperbolic cosVal returning angle in degrees. 
- def asin(sinVal: float) ‑> float
- 
Expand source codedef asin(sinVal: float) -> float: "ArcSine of sinVal returning angle in degrees." return rad_to_deg(_math.asin(sinVal))ArcSine of sinVal returning angle in degrees. 
- def asinh(sinVal: float) ‑> float
- 
Expand source codedef asinh(sinVal: float) -> float: "ArcSine of hyperbolic sinVal returning angle in degrees" return rad_to_deg(_math.asinh(sinVal))ArcSine of hyperbolic sinVal returning angle in degrees 
- def atan(tanVal: float) ‑> float
- 
Expand source codedef atan(tanVal: float) -> float: "ArcTan of tanVal returning angle in degrees." return rad_to_deg(_math.atan(tanVal))ArcTan of tanVal returning angle in degrees. 
- def atan2(y: float, x: float) ‑> float
- 
Expand source codedef atan2(y: float, x: float) -> float: "ArcTan of quotient of y and x returning angle in degrees." return rad_to_deg(_math.atan2(y, x))ArcTan of quotient of y and x returning angle in degrees. 
- def atanh(tanVal: float) ‑> float
- 
Expand source codedef atanh(tanVal: float) -> float: "ArcTan of hyperbolic tanVal returning angle in degrees." return rad_to_deg(_math.atanh(tanVal))ArcTan of hyperbolic tanVal returning angle in degrees. 
- def cos(angleInDegrees: float) ‑> float
- 
Expand source codedef cos(angleInDegrees: float) -> float: "Cosine of angle in degrees." angleInDegrees = abs(angleInDegrees % 360.0) if angleInDegrees in _quickCos: return _quickCos[angleInDegrees] return _math.cos(deg_to_rad(angleInDegrees))Cosine of angle in degrees. 
- def cosh(angleInDegrees: float) ‑> float
- 
Expand source codedef cosh(angleInDegrees: float) -> float: "Hyperbolic cosine of angle in degrees." return _math.cosh(deg_to_rad(angleInDegrees))Hyperbolic cosine of angle in degrees. 
- def deg_to_rad(angleInDegrees)
- 
Expand source codedef deg_to_rad(angleInDegrees): "Convert degrees to radians." return angleInDegrees * (_math.pi / 180)Convert degrees to radians. 
- def rad_to_deg(angleInRadians)
- 
Expand source codedef rad_to_deg(angleInRadians): "Convert radians to degrees." return angleInRadians * (180 / _math.pi)Convert radians to degrees. 
- def sin(angleInDegrees: float) ‑> float
- 
Expand source codedef sin(angleInDegrees: float) -> float: "Sine of angle in degrees." angleInDegrees = abs(angleInDegrees % 360.0) if angleInDegrees in _quickSin: return _quickSin[angleInDegrees] return _math.sin(deg_to_rad(angleInDegrees))Sine of angle in degrees. 
- def sinh(angleInDegrees: float) ‑> float
- 
Expand source codedef sinh(angleInDegrees: float) -> float: "Hyperbolic sine of angle in degrees." return _math.sinh(deg_to_rad(angleInDegrees))Hyperbolic sine of angle in degrees. 
- def tan(angleInDegrees: float) ‑> float
- 
Expand source codedef tan(angleInDegrees: float) -> float: "Tangent of angle in degrees." angleInDegrees = abs(angleInDegrees % 360.0) if angleInDegrees in _quickTan: return _quickTan[angleInDegrees] return _math.tan(deg_to_rad(angleInDegrees))Tangent of angle in degrees. 
- def tanh(angleInDegrees: float) ‑> float
- 
Expand source codedef tanh(angleInDegrees: float) -> float: "Hyperbolic tangent of angle in degrees." return _math.tanh(deg_to_rad(angleInDegrees))Hyperbolic tangent of angle in degrees.