Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Formatting a float in Harlowe

$
0
0
I use Twine 2.0 with Harlowe 1.2.4.
Is there a posibility to format a float? I know that working with floats can be a little tricky (e.g. 3.9999999 instead of 4).
I have a variable and its initial value is 100 and I want to substract from that number a different values e.g. 100 - 0.2, but (to avoid this "3.99999" in decimals) now I want to format a result decimal to 2 decimal places (99.80, eventually 99.78). Is it possible to format a decimal to a particular number of decimal places? Maybe the only option is to use javascript.

Viewing all articles
Browse latest Browse all 1844

Trending Articles