Commit a06bfbd0 authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

поправлены условия расчета функции AMORDEGRC;

поправлена работа с комплексными числами.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58083 954022d7-b5bf-4e40-9824-e11837661b57
parent 12f19f40
......@@ -413,6 +413,7 @@ Complex.prototype = {
hasReal = !hasImag || (this.real != 0);
if ( hasReal ) {
res.push( this.real );
}
if ( hasImag ) {
......@@ -427,7 +428,7 @@ Complex.prototype = {
else {
this.img > 0 && hasReal ? res.push( "+" + this.img ) : res.push( this.img );
}
res.push( this.suffix );
res.push( this.suffix ? this.suffix : "i" );
}
return res.join( "" );
},
......
......@@ -885,11 +885,14 @@ cAMORDEGRC.prototype.Calculate = function ( arg ) {
var per = 1 / rate, coeff;
if ( cost == salvage || period > per ) {
if ( cost == salvage /*|| period > per*/ ) {
return this.value = new cNumber( 0 );
}
if ( per >= 3 && per <= 4 ) {
if( per < 3){
coeff = 1;
}
else if ( per >= 3 && per <= 4 ) {
coeff = 1.5;
}
else if ( per >= 5 && per <= 6 ) {
......
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