Revision: 4875
          http://sourceforge.net/p/vexi/code/4875
Author:   mkpg2
Date:     2016-07-16 00:16:46 +0000 (Sat, 16 Jul 2016)
Log Message:
-----------
Delete obselete math implementation.

Modified Paths:
--------------
    branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/JSU.java

Removed Paths:
-------------
    branches/vexi3/org.vexi-library.js/src/main/jpp/org/ibex/js/JSMath.jpp

Modified: branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/JSU.java
===================================================================
--- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/JSU.java       
2016-07-16 00:05:55 UTC (rev 4874)
+++ branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/JSU.java       
2016-07-16 00:16:46 UTC (rev 4875)
@@ -177,8 +177,6 @@
     }
     
     // Instance Methods 
////////////////////////////////////////////////////////////////////
-    public final static JS MATH = new JSMath();
-    //public final static JS GLOBAL = new Scope.Global();    
     
     // TODO - move to Constants
     public static final JS T = JSBoolean.TRUE;

Deleted: branches/vexi3/org.vexi-library.js/src/main/jpp/org/ibex/js/JSMath.jpp
===================================================================
--- branches/vexi3/org.vexi-library.js/src/main/jpp/org/ibex/js/JSMath.jpp      
2016-07-16 00:05:55 UTC (rev 4874)
+++ branches/vexi3/org.vexi-library.js/src/main/jpp/org/ibex/js/JSMath.jpp      
2016-07-16 00:16:46 UTC (rev 4875)
@@ -1,109 +0,0 @@
-// Copyright 2000-2008 the Contributors, as shown in the revision logs.
-// Licensed under the Apache Software License 2.0 ("the License").
-// You may not use this file except in compliance with the License.
-
-package org.ibex.js; 
-
-import java.math.RoundingMode;
-
-/** The JavaScript Math object */
-public class JSMath extends JS.Immutable {
-    private static final JS E       = JSU.N(java.lang.Math.E);
-    private static final JS PI      = JSU.N(java.lang.Math.PI);
-    private static final JS LN10    = JSU.N(java.lang.Math.log(10));
-    private static final JS LN2     = JSU.N(java.lang.Math.log(2));
-    private static final JS LOG10E  = JSU.N(1/java.lang.Math.log(10));
-    private static final JS LOG2E   = JSU.N(1/java.lang.Math.log(2));
-    private static final JS SQRT1_2 = JSU.N(1/java.lang.Math.sqrt(2));
-    private static final JS SQRT2   = JSU.N(java.lang.Math.sqrt(2));
-
-    public JS callMethod(JS this_, JS method, JS[] args) throws JSExn {
-        switch(args.length) {
-            case 0: {
-                //#switch(JSU.toString(method))
-                case "random": return JSU.N(java.lang.Math.random());
-                //#end
-                break;
-            }
-            case 1: {
-                //#switch(JSU.toString(method))
-                case "ceil": return JSU.expectNumber(args[0]).round(0, 
RoundingMode.CEILING);
-                case "floor": return JSU.expectNumber(args[0]).round(0, 
RoundingMode.FLOOR);
-                case "round": return JSU.expectNumber(args[0]).round(0, 
RoundingMode.HALF_UP);
-                case "abs": return JSU.expectNumber(args[0]).abs();
-                case "sin": return 
JSU.N(java.lang.Math.sin(JSU.toDouble(args[0])));
-                case "cos": return 
JSU.N(java.lang.Math.cos(JSU.toDouble(args[0])));
-                case "tan": return 
JSU.N(java.lang.Math.tan(JSU.toDouble(args[0])));
-                case "asin": return 
JSU.N(java.lang.Math.asin(JSU.toDouble(args[0])));
-                case "acos": return 
JSU.N(java.lang.Math.acos(JSU.toDouble(args[0])));
-                case "atan": return 
JSU.N(java.lang.Math.atan(JSU.toDouble(args[0])));
-                case "sqrt": return 
JSU.N(java.lang.Math.sqrt(JSU.toDouble(args[0])));
-                case "exp": return 
JSU.N(java.lang.Math.exp(JSU.toDouble(args[0])));
-                case "log": return 
JSU.N(java.lang.Math.log(JSU.toDouble(args[0])));
-                //#end
-                break;
-            }
-            case 2: {
-                //#switch(JSU.toString(method))
-                case "min": return 
JSU.N(java.lang.Math.min(JSU.toDouble(args[0]), JSU.toDouble(args[1])));
-                case "max": return 
JSU.N(java.lang.Math.max(JSU.toDouble(args[0]), JSU.toDouble(args[1])));
-                case "pow": return 
JSU.N(java.lang.Math.pow(JSU.toDouble(args[0]), JSU.toDouble(args[1])));
-                case "atan2": return 
JSU.N(java.lang.Math.atan2(JSU.toDouble(args[0]), JSU.toDouble(args[1])));
-                //#end
-                break;
-            }
-            default: {
-                //#switch(JSU.toString(method))
-                   case "min":
-                       // super call will give default error
-                       if (args.length<3) return super.callMethod(this_, 
method, args);
-                       double min = JSU.toDouble(args[0]);
-                       for (int i=1; args.length>i; i++)
-                           min = java.lang.Math.min(min, 
JSU.toDouble(args[i]));
-                       return JSU.N(min);
-                   case "max":
-                       // super call will give default error
-                       if (args.length<3) return super.callMethod(this_, 
method, args);
-                       double max = JSU.toDouble(args[0]);
-                       for (int i=1; args.length>i; i++)
-                           max = java.lang.Math.max(max, 
JSU.toDouble(args[i]));
-                return JSU.N(max);
-                //#end
-                break;
-            }
-        }
-        return super.callMethod(this_, method, args);
-    }
-
-    public JS get(JS key) throws JSExn {
-        //#switch(JSU.toString(key))
-        case "E": return E;
-        case "LN10": return LN10;
-        case "LN2": return LN2;
-        case "LOG10E": return LOG10E;
-        case "LOG2E": return LOG2E;
-        case "PI": return PI;
-        case "SQRT1_2": return SQRT1_2;
-        case "SQRT2": return SQRT2;
-        case "ceil": return METHOD;
-        case "floor": return METHOD;
-        case "round": return METHOD;
-        case "min": return METHOD;
-        case "max": return METHOD;
-        case "pow": return METHOD;
-        case "atan2": return METHOD;
-        case "abs": return METHOD;
-        case "sin": return METHOD;
-        case "cos": return METHOD;
-        case "tan": return METHOD;
-        case "asin": return METHOD;
-        case "acos": return METHOD;
-        case "atan": return METHOD;
-        case "sqrt": return METHOD;
-        case "exp": return METHOD;
-        case "log": return METHOD;
-        case "random": return METHOD;
-        //#end
-        return super.get(key);
-    }
-}

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to