📐
Thunkable Docs
Build an AppDrag and Drop DocsSnap to Place Docs
Snap to Place
Snap to Place
  • 👋Welcome to Thunkable Docs
  • 👶Getting Started
    • Signing In
    • Your Thunkable Projects Page
    • Tutorials
    • Live Test your App
  • 🆕Create New Project
    • Project Settings
    • Project Assets and Sizes
  • Thunkable Sample Projects
  • Public Gallery of Projects
  • 🛠️ Components
  • 🔘User Interface
  • Button
  • Label
  • Text Input
  • List Viewer
  • Web Viewer
  • Switch
  • Slider
  • Alert
  • Loading Icon
  • Date Input
  • Time Input
  • PDF Reader
  • Rating
  • 📊Data Viewers
  • Data Viewer List
  • Data Viewer Grid
  • Custom Data Viewer Layout
  • Data Sources
  • 📐Layout
  • Top Tab Navigator
  • Bottom Tab Navigator
  • Stack Navigator
  • Drawer Navigator
  • Screen
  • Row
  • Column
  • 📷 Image
  • Image
  • Photo Library
  • Camera
  • Barcode Scanner
  • Image Recognizer
  • Animation by Lottie
  • Video
  • Video Recorder
  • 🗄️ Data
  • Local Storage
  • Local DB
  • Realtime DB by Firebase
  • Airtable
  • Media DB by Cloudinary
  • File Picker
  • Web API
  • 🌍Location
  • Maps by Google and Apple
  • Location Sensor
  • 💲Monetization
  • Ads by AdMob
  • In-App Purchase
  • 🌐Sensors
  • Gyroscope
  • Magnetometer
  • Accelerometer
  • Timer
  • Bluetooth Low Energy
  • 🔊Voice
  • Sound
  • Text to Speech
  • Speech Recognizer
  • Translator
  • Audio Recorder
  • 🤝Social
  • Share
  • Email Sign In by Firebase
  • Push Notifications by One Signal
  • 🎮Gaming
  • Canvas
  • Sprites
  • Sprite Gallery
  • Canvas Label
  • 🤖Gaming Blocks🎮
  • Events
  • Motion
  • Looks
  • Direction
  • Sensing
  • Add & Remove
  • Stage
  • Canvas Label
  • 🤖Blocks
  • Control
  • Logic
  • Math
  • Text
  • Lists
  • Color
  • Objects
  • Device
  • Variables
  • Functions
  • "Any Component" Blocks
  • 🖥️ App Services & Emulators
  • 🔒App Data Privacy
  • ➕Make Copy
  • 📥Download
  • 📤Share
  • 📱Publish
  • Publish to App Store (iOS)
    • TestFlight Overview
      • TestFlight in Depth
  • Publish to Play Store (Android) with AAB
  • Publish as a Web App
  • Generate Screenshots
  • 🔎Troubleshooting
    • Login Issues
    • FAQs
  • 📏Intro to Spacing
  • 🖼️ Intro to Sizing
  • 🔤Fonts
  • 💾Managing Storage
  • 📝Bugs and Product Feedback
  • Snap to Place Hour of Code Videos
Powered by GitBook
On this page
  • Numeric Value
  • Specify Number
  • Round
  • Round to X Decimal Places
  • Irrational Numbers
  • Analyze Numbers
  • Perform Operations
  • Constrain Number
  • Arithmetic
  • Get remainder
  • Trigonometry
  • Logarithmic values
  • Introduce Randomness
  • Random Integer
  • Random Fraction
  • Other Ways to add Randomness to Your Project
  • See Also

Was this helpful?

Export as PDF

Math

PreviousLogicNextText

Last updated 1 year ago

Was this helpful?

Numeric Value

Specify Number

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

Round

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

Irrational Numbers

There is also a block for irrational numbers like π

Analyze Numbers

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

Perform Operations

Constrain Number

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

Get remainder

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.

Logarithmic values

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.

Random Fraction

Other Ways to add Randomness to Your Project

See Also

Returns a random fraction xx x where 0≤x<10 ≤ x < 10≤x<1

The blocks also have blocks for selecting .

The blocks have a block for getting certain mathematical values from a List, including

Lists
Lists
random items from a list of values
sum min, max, averages, and standard deviation.