Scratch for Discord
Web-ApplicationDiscord Server
  • 🏠Home
  • 👋Introduction
    • About Scratch for Discord
  • 🎓Tutorial
    • Block Usage
    • Bot Setup
    • Hosting
    • Slash Commands
  • 🧰Toolbox
    • 💼Base
    • ⚽Basic
      • Text
      • Math
      • Colors
    • 🔩Functions
      • Logic
        • If logic
        • State Machines
      • Loops
      • Lists
      • Variables
        • Var
        • Let and Const
      • Functions
      • Collections
      • Buffers
      • Objects
      • 💾Database
      • 📂Files
        • 🖼️Images
          • 📬Member Cards
      • 🔑Securing
    • 🖥️Discord
      • 🎨Embeds
      • 📻Interactions
        • ⚒️Slash
          • 📤Actions
            • 🧱Stacks
            • 🔎Reporters
          • 📥Events
        • Button
        • Menu
        • Context menu
        • Forms
      • 🥁Music
        • 📜Music Lyrics
      • 🗄️Servers
        • 😀Emojis & Stickers
          • 📤Actions
          • 📤Events
        • 🔰Roles
          • 📤Actions
            • 🧱Stacks
            • ❔Booleans
          • 📤Events
        • 🗓️Schedule events
          • 📤Actions
          • 📤Events
        • 📺Channels
          • 📤Actions
          • 📥Events
        • 💬Messages
          • 📤Actions
            • 📝Messages
            • 📢Threads
            • 🔗Webhooks
            • 🥳Reactions
          • 📥Events
          • 🔎Reporters
            • 📌Message Context
        • 👥Members
          • 📤Actions
          • 📥Events
            • 📭Leave
    • 🚀Applications
      • 📊Charts
    • 🌐Websites
      • Dashboard
  • 🖥️Interface
    • ⚙️Settings
    • ⌨️Hotkeys
    • ▶️Download & Run
    • 🖇️Git
  • 🪄Advanced
    • Custom Code
  • 🔗Links
    • 📦Packages
    • ❔FAQ
    • Web-Application
    • Discord Server
    • Source Code
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Toolbox
  2. Basic

Math

PreviousTextNextColors

Last updated 1 year ago

Was this helpful?

Block
Function
Output

Basic Number Input

0

Basic math functions (Sum, difference, , product ,quotient, power)

2

More Functions (square root, absolute, negation, logarithm, base10 logarithm, euler number, 10 on power of..)

3

Functions (sin, cos, tan, asin, acos, atan)

0,707

Constants ( π, e, Φ, sqrt(2), sqrt(1/2), infinity)

2.71828

Check if number is even, odd, prime, whole, positive or negative or divisible by x

True

Round a number

3

Sum, minimal, maximal, average, median, modes, standart deviation, random item

6

remainder from dividing

4

Constrain a number to be between the specified limits

50

Return a random number that is whole

(1 - 100)

return a random fraction

<0,0 - 1,0)

Examples

🧰
⚽
Making percentages using math blocks
You must have at least some luck to do something