changeset 1130:bfbd5401353a

add Number.float()
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 11 Dec 2017 23:36:52 -0700
parents 3234a14bb1f8
children 46732cc0ab87
files src/luan/modules/BasicLuan.java src/luan/modules/Number.luan
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r 3234a14bb1f8 -r bfbd5401353a src/luan/modules/BasicLuan.java
--- a/src/luan/modules/BasicLuan.java	Mon Dec 04 01:26:57 2017 -0700
+++ b/src/luan/modules/BasicLuan.java	Mon Dec 11 23:36:52 2017 -0700
@@ -144,6 +144,10 @@
 		return v;
 	}
 
+	public static float assert_float(float v) throws LuanException {
+		return v;
+	}
+
 	@LuanMethod public static byte[] assert_binary(byte[] v) throws LuanException {
 		Utils.checkNotNull(v);
 		return v;
diff -r 3234a14bb1f8 -r bfbd5401353a src/luan/modules/Number.luan
--- a/src/luan/modules/Number.luan	Mon Dec 04 01:26:57 2017 -0700
+++ b/src/luan/modules/Number.luan	Mon Dec 11 23:36:52 2017 -0700
@@ -6,6 +6,7 @@
 local Number = {}
 
 Number.double = BasicLuan.assert_double
+Number.float = BasicLuan.assert_float
 Number.integer = BasicLuan.assert_integer
 Number.long = BasicLuan.assert_long
 Number.long_to_string = MathLuan.long_to_string