Difference between revisions of "Mixly Block Category - Math"
From Microduino Wiki
(→Number Function) |
(→Trigonometry Function) |
||
Line 9: | Line 9: | ||
=Trigonometry Function= | =Trigonometry Function= | ||
− | * sin(). Read more here: https://www.arduino.cc/en/Reference/Sin | + | * sin() - Takes the sin of the input and returns it. Read more here: https://www.arduino.cc/en/Reference/Sin |
− | * cos(). Read more here: https://www.arduino.cc/en/Reference/Cos | + | * cos() - Takes the cos of the input and returns it. Read more here: https://www.arduino.cc/en/Reference/Cos |
− | * tan(). Read more here: https://www.arduino.cc/en/Reference/Tan | + | * tan() - Takes the tan of the input and returns it. Read more here: https://www.arduino.cc/en/Reference/Tan |
* asin(), acos(), atan(). Read more here: https://www.arduino.cc/en/Math/H | * asin(), acos(), atan(). Read more here: https://www.arduino.cc/en/Math/H | ||
Revision as of 21:22, 15 February 2017
Contents
Number Value
Numeric value which can be assigned to a variable or used in function parameters.
Arithmetic Operations
Performs the arithmetic operations and returns that value. Variables can be used to inputs.
- +, -, x, ÷ : add, subtract, multiply, divide. Read more here: https://www.arduino.cc/en/Reference/Arithmetic
- % : modulo. Read more here: https://www.arduino.cc/en/Reference/modulo
- ^ : power. i.e. 2^3 = 2 * 2 * 2 = 8
Trigonometry Function
- sin() - Takes the sin of the input and returns it. Read more here: https://www.arduino.cc/en/Reference/Sin
- cos() - Takes the cos of the input and returns it. Read more here: https://www.arduino.cc/en/Reference/Cos
- tan() - Takes the tan of the input and returns it. Read more here: https://www.arduino.cc/en/Reference/Tan
- asin(), acos(), atan(). Read more here: https://www.arduino.cc/en/Math/H
Number Function
- toInt - Converts the input into an Integer type and returns it. (https://www.arduino.cc/en/Reference/Int) and returns it. Read more here: https://www.arduino.cc/en/Reference/IntCast
- abs - Takes the absolute value of the input and returns it. Read more here: https://www.arduino.cc/en/reference/abs
- sq - Takes the square of the input and returns it. Read more here: https://www.arduino.cc/en/Reference/Sq
- sqrt - Takes the square root of the input and returns it. Read more here: https://www.arduino.cc/en/Reference/Sqrt
- log - Takes the natural log of the input and returns it: Read more here: https://www.arduino.cc/en/Reference/MathHeader