➗ Math – Your “Magic Calculator”

What it is: Blocks for doing math and calculations.

What it does: Performs operations with numbers.

Example: Addition, subtraction, multiplication, division, dividing time, calculating distances.

👉 It’s the robot’s internal calculator

 

🧩 Fun Guide to Math Blocks (Clu-blocks Pro)

🧠 Important! Math blocks help your robot think with numbers — from simple addition to random values and even converting between number systems. They’re like your robot’s built-in calculator and logic engine!

#BlockWhat it doesDropdown optionsWhat the options mean
10A number blockYou can type any number here to use in your code
2Constant πInserts a math constantπ, eπ = 3.14159… (used in circles)
e = 2.718… (used in growth and logs)
3sin 90Applies a math function to a numbersin, cos, tan, asin, acos, atan, ln, log10, e^, 10^These are trig and log functions — great for advanced math and angles
4toint xConverts a value to another typetoInt, toFloat, transfer byte, bytetolnttoInt: makes it a whole number
toFloat: makes it a decimal
– Others are for byte conversions
5binary 15Converts a number to another formatbinary, octal, hexShows the number in binary (0s and 1s), octal, or hexadecimal
60 ÷ 0, 0 ÷ 1, a ÷ 1Division blocks+, , ×, ÷, %, //, **+: add
: subtract
×: multiply
÷: divide
%: remainder
//: whole number division
**: power
7Round: 0.998Rounds a numberRound, Ceil, Floor, abs, sqrtRound: nearest whole
Ceil: round up
Floor: round down
abs: absolute value
sqrt: square root
8max(1, 2)Finds the biggest or smallest numbermax, minmax: biggest
min: smallest
9random seed System running time msSets the seed for random numbersMakes random numbers more predictable (used in games or testing)
10random int from 1 to 100Generates a random numberint, floatint: whole number
float: decimal number
11Random 100 between (low) 1 and (high) 100Another way to get a random numberYou choose the range: lowest and highest possible values
12put two Dead 1010 Convert to Ten DeadConverts a number between basestwo, eight, Ten, 16two: binary
eight: octal
Ten: decimal
16: hexadecimal
13Map 50 from [0, 100] to [1, 100]Maps a number from one range to anotherUseful for scaling values (e.g. sensor readings to screen size)

🧠 Quick Tips for Students

  • Use basic math blocks for scores, timing, brightness, and movement.
  • Use conversion blocks when working with sensors, bytes, or number systems.
  • Use random blocks for games, surprises, or unpredictable behavior.
  • Use mapping when you want to turn one range of values into another (like turning 0–1023 into 0–100%).
On this page