lib: add nitunits to Numeric::value_of
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 23 May 2014 15:26:15 +0000 (11:26 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 28 May 2014 17:33:39 +0000 (13:33 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/standard/kernel.nit

index 596342c..f54cd2f 100644 (file)
@@ -241,6 +241,11 @@ interface Numeric
        fun zero: OTHER is abstract
 
        # The value of `val` in the domain of `self`
+       #
+       #     assert 1.0.value_of(2) == 2.0
+       #     assert 1.0.value_of(2.0) == 2.0
+       #     assert 1.value_of(2) == 2
+       #     assert 1.value_of(2.0) == 2
        fun value_of(val: Numeric): OTHER is abstract
 end