I figured out how to calculate the percentage of a number in another number, and accidentally found out how to get a number percentage of another number... that was terrible. Here's the blocks and I think you can figure out what they do.
Here's the project
I hate myself for taking over one week to figure out how to do this, it's super simple.
I think it'd be better if the
(percentage of (25) in (50)::operators)
block returned 0.5 instead of 50. Percentages are really numbers usually in the range of 0 to 1, so I think it'd be better to return that. It will also make it easier to do math with a percentage representing a number between 0 and 1 instead of a number between 0 and 100.
In mathematics, a percentage is a number or ratio that represents a fraction of 100. It is often denoted by the symbol "%" or simply as "percent" or "pct." For example, 35% is equivalent to the decimal 0.35, or the fraction. 35.