nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
refund: `Dollar::from_float` use the autoinit constructor
[nit.git]
/
contrib
/
refund
/
src
/
refund_base.nit
diff --git
a/contrib/refund/src/refund_base.nit
b/contrib/refund/src/refund_base.nit
index
fbd5fee
..
ec1de5a
100644
(file)
--- a/
contrib/refund/src/refund_base.nit
+++ b/
contrib/refund/src/refund_base.nit
@@
-402,7
+402,7
@@
class Dollar
# Inits `self` from a float `value`.
init from_float(value: Float) do
- self.value = (value * 100.0).to_i
+ init((value * 100.0).to_i)
end
redef fun to_s do return "{value / 100}.{value % 100}$"