|
VEX IQ Python API
|
PyMite's math module, using Python 2.6 math library as a reference https://docs.python.org/2.6/library/math.html. More...
Functions | |
Number theoretic and representation functions | |
| def | ceil (x) |
| Return the ceiling of x as a float, the smallest integer value greater than or equal to x. More... | |
| def | fabs (x) |
| Return the absolute value of x. More... | |
| def | floor (x) |
| Return the floor of x as a float, the largest integer value less than or equal to x. More... | |
Trigonometric functions | |
| def | acos (x) |
| Return the arc cosine of x, in radians. More... | |
| def | asin (x) |
| Return the arc sine of x, in radians. More... | |
| def | atan (x) |
| Return the arc tangent of x, in radians. More... | |
| def | atan2 (y, x) |
| Return atan(y / x), in radians. More... | |
| def | cos (x) |
| Return the cosine of x radians. More... | |
| def | sin (x) |
| Return the sine of x radians. More... | |
| def | tan (x) |
| Return the tangent of x radians. More... | |
Angular conversion | |
| def | degrees (x) |
| Converts angle x from radians to degrees. More... | |
| def | radians (x) |
| Converts angle x from degrees to radians. More... | |
Power and logarithmic functions | |
| float | pi = 3.1415926535897931 |
| The mathematical constant PI = 3.141592..., to available precision. More... | |
| float | e = 2.7182818284590451 |
| The mathematical constant e = 2.718281..., to available precision. More... | |
| def | log (x, base=None) |
| With one argument, return the natural logarithm of x (to base e). More... | |
| def | sqrt (x) |
| Return the square root of x. More... | |
PyMite's math module, using Python 2.6 math library as a reference https://docs.python.org/2.6/library/math.html.
| def math.ceil | ( | x | ) |
Return the ceiling of x as a float, the smallest integer value greater than or equal to x.
| def math.fabs | ( | x | ) |
Return the absolute value of x.
| def math.floor | ( | x | ) |
Return the floor of x as a float, the largest integer value less than or equal to x.
| def math.log | ( | x, | |
base = None |
|||
| ) |
With one argument, return the natural logarithm of x (to base e).
With two arguments, return the logarithm of x to the given base, calculated as log(x)/log(base)
| def math.sqrt | ( | x | ) |
Return the square root of x.
| def math.acos | ( | x | ) |
Return the arc cosine of x, in radians.
| def math.asin | ( | x | ) |
Return the arc sine of x, in radians.
| def math.atan | ( | x | ) |
Return the arc tangent of x, in radians.
| def math.atan2 | ( | y, | |
| x | |||
| ) |
Return atan(y / x), in radians.
The result is between -pi and pi. The vector in the plane from the origin to point (x, y) makes this angle with the positive X axis. The point of atan2() is that the signs of both inputs are known to it, so it can compute the correct quadrant for the angle. For example, atan(1) and atan2(1, 1) are both pi/4, but atan2(-1, -1) is -3*pi/4.
| def math.cos | ( | x | ) |
Return the cosine of x radians.
| def math.sin | ( | x | ) |
Return the sine of x radians.
| def math.tan | ( | x | ) |
Return the tangent of x radians.
| def math.degrees | ( | x | ) |
Converts angle x from radians to degrees.
| def math.radians | ( | x | ) |
Converts angle x from degrees to radians.
| float math.pi = 3.1415926535897931 |
The mathematical constant PI = 3.141592..., to available precision.
| float math.e = 2.7182818284590451 |
The mathematical constant e = 2.718281..., to available precision.
1.8.15