librasteve / raku-Physics-Measure

do calculations on objects with value, units and error
Artistic License 2.0
11 stars 2 forks source link

Accept comma ',' in <number> part #57

Closed librasteve closed 1 year ago

librasteve commented 1 year ago

[17:40]Anton Antonov: @librasteve I have a complaint on "Physics::Unit" : 1) "24000 miles per hour" is parsed 2) "24,000 miles per hour" is not parsed

from https://discord.com/channels/538407879980482560/768511641758466088/1133076220037312552

librasteve commented 1 year ago

The plan...

Set behaviour if number part contains a comma ','

$Physics::Measure::number-comma = ''; #use '' to allow as thousands sep / '.' to convert european style decimals
my Speed $s2 = ♎️'24,000 miles per hour'; #24000mph
librasteve commented 1 year ago

fixed