pxt-calliope/docs/blocks/math.md
Peli de Halleux 5237b86cf5 docs cleanup
2016-09-01 06:49:39 -07:00

37 lines
332 B
Markdown

# Math
### [Numeric](/reference/types/number) values: 0, 1, 2, ...
```block
0;
1;
2;
```
### Arithmetic binary operation (+, -, *, /)
```block
0+1;
0-1;
1*2;
3/4;
```
### Absolute value
```block
Math.abs(-5);
```
### Minimum/maximum of two values
```block
Math.min(0, 1);
```
### Random value
```block
Math.random(5);
```