diff core/src/luan/modules/MathLuan.java @ 566:90b93790c544

Number and Math documentation and minor changes
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 05 Jul 2015 18:26:04 -0600
parents fda38db30e65
children b21d82ee5756
line wrap: on
line diff
--- a/core/src/luan/modules/MathLuan.java	Sun Jul 05 00:47:00 2015 -0600
+++ b/core/src/luan/modules/MathLuan.java	Sun Jul 05 18:26:04 2015 -0600
@@ -54,8 +54,12 @@
 		return Math.floor(x);
 	}
 
-	public static double log(double x) {
-		return Math.log(x);
+	public static double fmod(double x,double y) {
+		return x % y;
+	}
+
+	public static double log(double x,Double base) {
+		return base==null ? Math.log(x) : Math.log(x)/Math.log(base);
 	}
 
 	public static double min(double x,double... a) {
@@ -79,10 +83,6 @@
 		return new double[]{i,x-i};
 	}
 
-	public static double pow(double x,double y) {
-		return Math.pow(x,y);
-	}
-
 	public static double rad(double x) {
 		return Math.toRadians(x);
 	}
@@ -99,10 +99,6 @@
 		return Math.sin(x);
 	}
 
-	public static double sinh(double x) {
-		return Math.sinh(x);
-	}
-
 	public static double sqrt(double x) {
 		return Math.sqrt(x);
 	}
@@ -111,12 +107,8 @@
 		return Math.tan(x);
 	}
 
-	public static double tanh(double x) {
-		return Math.tanh(x);
-	}
-
-	public static String long_to_string(long i,Integer radix) {
-		return radix==null ? Long.toString(i) : Long.toString(i,radix);
+	public static String long_to_string(long i,int radix) {
+		return Long.toString(i,radix);
 	}
 
 }