Difference between revisions of "Mixly Block Category - Math"

From Microduino Wiki
Jump to: navigation, search
(Max)
(Random Integer)
Line 26: Line 26:
  
 
=Random Integer=
 
=Random Integer=
 +
Returns a random integer between the two input values.
 +
*min (left input) - lower bound of the random value, inclusive (optional)
 +
*max (right input) - upper bound of the random value, exclusive
 +
 +
i.e. random('''5''', '''77''') will return a value between '''5''' and '''76'''.
 +
 +
Read more here: https://www.arduino.cc/en/Reference/Random
 +
 
=Constrain=
 
=Constrain=
 
=Map=
 
=Map=

Revision as of 21:27, 15 February 2017

Number Value

Numeric value which can be assigned to a variable or used in function parameters.

Arithmetic Operations

Performs the arithmetic operations on the left input with the right input. Then returns that value. Variables can be used to inputs.

Trigonometry Function

Number Function

Max / Min

Random Integer

Returns a random integer between the two input values.

  • min (left input) - lower bound of the random value, inclusive (optional)
  • max (right input) - upper bound of the random value, exclusive

i.e. random(5, 77) will return a value between 5 and 76.

Read more here: https://www.arduino.cc/en/Reference/Random

Constrain

Map