> For the complete documentation index, see [llms.txt](https://docs.thunkable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thunkable.com/snap-to-place/math.md).

# Math

## Numeric Value

### Specify Number

![](/files/-LAn6737wUBYsCZBpqBJ)

Use this block to specify a number you want to use in your app.

### Round

![](/files/-MXlC9xs1pIj_wPvo8Et)

You can also round up or down a decimal figure into an integer using the **round** block

### Round to X Decimal Places

You can also round a number to a selected amount of decimal places

![](/files/-MXlFFCEKfTOjhdR6L47)

### Irrational Numbers

There is also a block for irrational numbers like `π`

![](/files/-LAn674sTAgeTdQ7HvAh)

![](/files/-MXlBuQ26W65qNQ3c8Yn)

## Analyze Numbers

![](/files/-LAn67XCD_L3AU2WdTEJ)

![](/files/-MXlDagTbf-Q7wN_MowT)

Returns **true** or **false** based on whether the chosen condition applies to the number

## Perform Operations

### Constrain Number

![](/files/-MXlE9OmRbw_ZLXTY1Ig)

If the given number is of a lower value than the lower bound, this block will set the given number to have the value of the lower bound.

If the given number is of a higher value than the upper bound, this block will set the given number to have the value of the upper bound.

### Arithmetic

Perhaps the most often used calculation in an app is `addition` but this block also supports `subtraction`, `multiplication`, `division` and `exponential` figures

![](/files/-LAn678xGSInEBGhVfDM)

![](/files/-MXlCXCY5pghiA2ev-ed)

### Get remainder

![](/files/-LAn67JQkfxHkuwMKzau)

Returns the remainder when a number is divided by another number.

### Trigonometry

There are also a few more advanced calculation blocks that may be helpful including `trigonometric.`

These blocks will return a value assuming the input is given in **degrees**.

![](/files/-LAn67CMs3OyF3bPVZXl)

![](/files/-MXlCnzY04KKHKCeujxi)

### Logarithmic values

![](/files/-LAn67Fs6NTVRGokU-PJ)

![](/files/-MXlCusUIGH2d-2ndItJ)

###

## Introduce Randomness

For games and other apps, it may be important to introduce randomness into your app.

### Random Integer

Returns integer between two given integers. Is inclusive of the given integers.

![](/files/-LAn67QOIwapnsDmPuFc)

### Random Fraction

Returns a random fraction $$x$$ where $$0 ≤ x < 1$$

![](/files/-LAn67QPNZ75lf3RymHi)

### Other Ways to add Randomness to Your Project

The [Lists](/snap-to-place/lists.md) blocks also have blocks for selecting [random items from a list of values](/snap-to-place/lists.md#sum-min-max-averages-standard-deviation-random-item).

## See Also

The [Lists](/snap-to-place/lists.md) blocks have a block for getting certain mathematical values from a List, including [sum min, max, averages, and standard deviation.](/snap-to-place/lists.md#sum-min-max-averages-standard-deviation-random-item)
