Floor and Ceiling

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.

1 Like

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!)

2 Likes

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

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.