NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

(abs / floor / sqrt / sin / cos) of ( ) — Scratch Block Guide

📌 What you will learn

Provides scientific math functions: abs, floor, ceiling, sqrt, sin, cos, tan, asin, acos, atan, ln, log, e^, and 10^.

What this block does

Provides scientific math functions: abs, floor, ceiling, sqrt, sin, cos, tan, asin, acos, atan, ln, log, e^, and 10^.

Create gentle floating bob animations with sin(timer × 200), or 3D raycasting with sin/cos.

  • Category: Operators Blocks
  • Key tip: Scratch’s sin and cos take degrees, making them super intuitive to experiment with.

Working Scratch example

Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.

Example using (abs / floor / sqrt / sin / cos) of ( )
  1. When green flag clicked
  2. Forever
  3. Set y to ((sin of (timer * 200)) * 15)

Try it: Makes a coin or ghost bob smoothly up and down like a wave.

Related block guides

Explore other blocks in the same category or return to the full English Block Dictionary.

Back to Operators Blocks See the overview and patterns for Operators Blocks. Learn more → Scratch Block Dictionary (All Categories) Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Learn more →

FAQ

When should I use "(abs / floor / sqrt / sin / cos) of ( )" in Scratch?

Create gentle floating bob animations with sin(timer × 200), or 3D raycasting with sin/cos. Scratch’s sin and cos take degrees, making them super intuitive to experiment with.

This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.