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

Property definitions

core $ Numeric :: value_of
	# 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
lib/core/kernel.nit:479,2--485,46

core $ UInt32 :: value_of
	redef fun value_of(val) do return val.to_u32
lib/core/fixed_ints.nit:624,2--45

core $ Int8 :: value_of
	redef fun value_of(val) do return val.to_i8
lib/core/fixed_ints.nit:140,2--44

core $ Int16 :: value_of
	redef fun value_of(val) do return val.to_i16
lib/core/fixed_ints.nit:261,2--45

core $ UInt16 :: value_of
	redef fun value_of(val) do return val.to_u16
lib/core/fixed_ints.nit:382,2--45

core $ Int32 :: value_of
	redef fun value_of(val) do return val.to_i32
lib/core/fixed_ints.nit:503,2--45

gmp $ Ratio :: value_of
    #     assert((3.to_r).value_of(2) == 2.to_r)
    redef fun value_of(n) do return n.to_r
lib/gmp/gmp.nit:368,5--369,42

core $ Byte :: value_of
	redef fun value_of(val) do return val.to_b
lib/core/kernel.nit:642,2--43

core $ Float :: value_of
	redef fun value_of(val) do return val.to_f
lib/core/kernel.nit:545,2--43

gmp $ BigInt :: value_of
    #     assert(11.to_bi.value_of(4) == 4.to_bi)
    redef fun value_of(i) do return i.to_bi
lib/gmp/gmp.nit:257,5--258,43

core $ Int :: value_of
	redef fun value_of(val) do return val.to_i
lib/core/kernel.nit:739,2--43