Discuss Scratch

MASTER_PLANET2
Scratcher
12 posts

Compress Block

A new blocks suggestion - the Compress Block

It will convert a number into its abbreviation

EXAMPLES

If you input 12759363, it will output 12 million

If you input 4567876354526, it will output 4 trillion

If you just input a small number like 145, it will just output the same number

If the result has 3 numbers in front like: 476 million, it would instead show 476m, otherwise just the regular result

Other Names

maybe it could even be called Abbreviation of number Block or Shorten number Block


It could be used for games using large numbers, especially clickers.

Last edited by MASTER_PLANET2 (April 8, 2024 04:02:57)


Check out my PvP game!
EatNYeet
Scratcher
500+ posts

Compress Block

MASTER_PLANET2 wrote:

(#1)
If you input 12759363, it will output 12 million

MASTER_PLANET2 wrote:

(#1)
If the result has 3 numbers in front like: 476 million, it would instead show 476m, otherwise just the regular result
How do you differentiate between when the two would happen? Why would 476 million output 476m but 12759363 output the full word?

Either way, it's hard to find non-specific use cases for this, especially since it appears to round to the nearest thousand/million/billion and so forth.

Why is this a thing?
MASTER_PLANET2
Scratcher
12 posts

Compress Block

EatNYeet wrote:

MASTER_PLANET2 wrote:

(#1)
If you input 12759363, it will output 12 million

MASTER_PLANET2 wrote:

(#1)
If the result has 3 numbers in front like: 476 million, it would instead show 476m, otherwise just the regular result
How do you differentiate between when the two would happen? Why would 476 million output 476m but 12759363 output the full word?

Either way, it's hard to find non-specific use cases for this, especially since it appears to round to the nearest thousand/million/billion and so forth.

If an output has 3 numbers in front and then an illion, then the result would be 3 numbers and 1-3 letters (depending on illion)

If an output has 2 or 1 number(s) in front and then an illion, then the result would not be changed

So basically shortening the illion if the number in front is 3 digits long.

Last edited by MASTER_PLANET2 (April 8, 2024 04:03:45)


Check out my PvP game!

Powered by DjangoBB