1.5000 -> $1.50 1.5050 -> $1.50 1.5051 -> $1.51 #### 1.5100 -> $1.51 1.5150 -> $1.52 #### sub monetize { require Math::BigFloat; #Defaults to a real $USD amount, rounding to nearest penny Math::BigFloat->new($_[0])->ffround( $_[1] || -2 ); }
## 1.5100 -> $1.51 1.5150 -> $1.52 ##
## sub monetize { require Math::BigFloat; #Defaults to a real $USD amount, rounding to nearest penny Math::BigFloat->new($_[0])->ffround( $_[1] || -2 ); }