nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b6256a
)
refund: `Dollar::from_float` use the autoinit constructor
author
Jean Privat
<jean@pryen.org>
Mon, 13 Jul 2015 20:04:51 +0000
(16:04 -0400)
committer
Jean Privat
<jean@pryen.org>
Mon, 13 Jul 2015 20:04:51 +0000
(16:04 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
contrib/refund/src/refund_base.nit
patch
|
blob
|
history
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}$"