Commit 2a8bdc63 authored by GoshaZotov's avatar GoshaZotov

modify cBESSELI function

parent ccbe0f98
...@@ -958,48 +958,46 @@ ...@@ -958,48 +958,46 @@
cBESSELI.prototype.argumentsMin = 2; cBESSELI.prototype.argumentsMin = 2;
cBESSELI.prototype.argumentsMax = 2; cBESSELI.prototype.argumentsMax = 2;
/*cBESSELI.prototype.Calculate = function ( arg ) { /*cBESSELI.prototype.Calculate = function ( arg ) {
var x = arg[0], var x = arg[0],
n = arg[1]; n = arg[1];
if ( x instanceof cArea || x instanceof cArea3D ) { if ( x instanceof cArea || x instanceof cArea3D ) {
x = x.cross( arguments[1] ); x = x.cross( arguments[1] );
} }
else if ( x instanceof cArray ) { else if ( x instanceof cArray ) {
x = x.getElementRowCol( 0, 0 ); x = x.getElementRowCol( 0, 0 );
} }
if ( n instanceof cArea || n instanceof cArea3D ) { if ( n instanceof cArea || n instanceof cArea3D ) {
n = n.cross( arguments[1] ); n = n.cross( arguments[1] );
} }
else if ( n instanceof cArray ) { else if ( n instanceof cArray ) {
n = n.getElementRowCol( 0, 0 ); n = n.getElementRowCol( 0, 0 );
} }
x = x.tocNumber(); x = x.tocNumber();
n = n.tocNumber(); n = n.tocNumber();
if ( x instanceof cError ) { if ( x instanceof cError ) {
return this.value = x; return this.value = x;
} }
if ( n instanceof cError ) { if ( n instanceof cError ) {
return this.value = n; return this.value = n;
} }
x = x.getValue(); x = x.getValue();
n = n.getValue(); n = n.getValue();
if ( n < 0 ){ if ( n < 0 ){
return this.value = new cError( cErrorType.not_numeric ); return this.value = new cError( cErrorType.not_numeric );
} }
this.value = BesselI( x, n ); if(x < 0){
return this.value; x = Math.abs(x);
}
}; n = Math.floor(n);
cBESSELI.prototype.getInfo = function () {
return { this.value = BesselI( x, n );
name:this.name, return this.value;
args:"( effect-rate , npery )"
};
};*/ };*/
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment