Changeset 20904


Ignore:
Timestamp:
07/13/16 15:47:52 (9 years ago)
Author:
ayfeng
Message:

FIX: Syntax error with math functions, incorrect exponentiation syntax
ceil and log10 functions were called with 'Mat' instead of 'Math'
10n used instead of Math.pow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/checkplotoptions.js

    r19741 r20904  
    1010        if (options.exist('unit')){
    1111                if (options.getfieldvalue('unit') === 'km'){
    12                         options.changefieldvalue('unit',10^-3);
     12                        options.changefieldvalue('unit',Math.pow(10,-3));
    1313                }
    1414                if (options.getfieldvalue('unit') === '100km'){
    15                         options.changefieldvalue('unit',10^-5);
     15                        options.changefieldvalue('unit',Math.pow(10,-5));
    1616                }
    1717        }
     
    226226                   
    227227                   //default values
    228                    options.changefieldvalue('scaleruler',[ArrayMin(md.mesh.x)+6/8*Lx, ArrayMin(md.mesh.y)+1/10*Ly, 10^(Mat.ceil(Mat.log10(Lx)))/5, Math.floor(Lx/100), 5]);
     228                   options.changefieldvalue('scaleruler',[ArrayMin(md.mesh.x)+6/8*Lx, ArrayMin(md.mesh.y)+1/10*Ly, Math.pow(10,(Math.ceil(Math.log10(Lx))))/5, Math.floor(Lx/100), 5]);
    229229           }
    230230        }
Note: See TracChangeset for help on using the changeset viewer.