Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to find which number is closest to another number?
- Takeshi64
-
7 posts
How to find which number is closest to another number?
I looked around and I saw the sorting values page on the wiki talking about bubble sort. I understand the basic logic around how the sorting works, but the script they showed made no sense to me. It doesn't even have to be that method of sorting, any way to find which number is closest to another is fine. Thanks for reading.
- drmcw
-
1000+ posts
How to find which number is closest to another number?
Sorting uses comparison to sort items but finding the closest to a number is different. To find the closest number loop through the list of numbers and find the smallest
- Takeshi64
-
7 posts
How to find which number is closest to another number?
Okay, thank you so much for helping! I will try to work the whole system out on my own, hopefully I don't run into too many more problems.
- LJayDaGoat
-
32 posts
How to find which number is closest to another number?
Last edited by LJayDaGoat (Feb. 24, 2025 15:23:46)
- Discussion Forums
- » Help with Scripts
-
» How to find which number is closest to another number?