# Floor and Ceiling

**URL:** <https://community.thunkable.com/t/floor-and-ceiling/515313>\
**Category:** Questions about Thunkable X\
**Created:** [March 14, 2020, 9:24pm UTC](https://community.thunkable.com/t/floor-and-ceiling/515313 "2020-03-14T21:24:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ejones.uk](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@ejones.uk](https://community.thunkable.com/u/ejones.uk)\
**Post date:** [March 14, 2020, 9:24pm UTC](https://community.thunkable.com/t/floor-and-ceiling/515313/1 "2020-03-14T21:24:46Z")

</div>

I’ve tried to find the answer to a problem I am experiencing. I have used App Inventor to create a calculator for specific use. It uses the **floor** function, this is required as I am parsing the the integer and decimals of a calculation to arrive at various ratios.  
The situation is this. A machine moves the table 1.5mm per revolution of the handwheel, thus the pitch is 1.5mm, the hand wheel is divided into 75 0.02mm graduations. The calculator is designed to indicate the number of full turns and the remaining graduations.  
example 3mm = 2 full turns and 0 graduations. assume 42mm this will require 28 turns and 0 graduations.  
one inch = 25.4mm which gives 16 turns and 70 graduation.

I use ceiling on my Android app and it works great.

Hopefully an answer as to why, or even how I can replicate the floor function in Thunkable.

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 14, 2020, 11:35pm UTC](https://community.thunkable.com/t/floor-and-ceiling/515313/2 "2020-03-14T23:35:17Z")

</div>

if you won’t be using negative numbers, you can use, from the Math group, the **round** function and click down arrow. the **round\_down** option is equivalent to **floor**. below is the behavior of all the options.  
round(3.5) = 4 (fractional part 0.5 and up makes it round up)  
round\_down(3.5)=3  
round\_up(3.5)=4  
try it. (i’m not sure of the behavior of negative numbers!)

---

<div class="post-metadata">

**Author:** ![ejones.uk](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@ejones.uk](https://community.thunkable.com/u/ejones.uk)\
**Post date:** [March 15, 2020, 9:03pm UTC](https://community.thunkable.com/t/floor-and-ceiling/515313/3 "2020-03-15T21:03:16Z")

</div>

All sorted with Round Down, thanks for the pointers, brain was getting a few cells mixed up.

---

<div class="post-metadata">

**Author:** ![ejones.uk](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@ejones.uk](https://community.thunkable.com/u/ejones.uk)\
**Post date:** [March 15, 2020, 9:06pm UTC](https://community.thunkable.com/t/floor-and-ceiling/515313/4 "2020-03-15T21:06:47Z")

</div>

Sorted. Thank you, I was making a meal out of a sandwich. Just needed to break it down on a calculator to find the error. I had assumed that the use of round down and up related to floor and ceiling, but wasn’t totally sure as I was getting weird results.  
Much appreciate your kind help.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:40am UTC](https://community.thunkable.com/t/floor-and-ceiling/515313/5 "2024-11-08T11:40:26Z")

</div>


