Changeset 38267 for lang

Show
Ignore:
Timestamp:
08/14/10 06:43:05 (3 years ago)
Author:
dankogai
Message:

untabified and got rid of zenkaku space

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/math-complex/trunk/complex.js

    r38266 r38267  
    11/* 
    2  * $Id: complex.js,v 0.5 2010/08/13 19:59:24 dankogai Exp dankogai $ 
     2 * $Id: complex.js,v 0.6 2010/08/13 21:39:40 dankogai Exp dankogai $ 
    33 */ 
    44 
     
    66    if (Math.Complex) return; 
    77    Math.Complex = function(re, im){ 
    8            this.re = re ? re : 0; 
    9            this.im = im ? im : 0; 
     8       this.re = re ? re : 0; 
     9       this.im = im ? im : 0; 
    1010    }; 
    1111    Math.Complex.prototype = { 
     
    5252            if (that.constructor === this.constructor){ 
    5353                var d = that.re * that.re + that.im * that.im; 
    54                 if (d === 0) return new Math.Complex(this.re/0, this.im/0); 
     54                if (d === 0) return new Math.Complex(this.re/0, this.im/0); 
    5555                return new Math.Complex( 
    5656                    (this.re * that.re + this.im * that.im) / d,  
     
    5959            }else{ 
    6060                return new Math.Complex( 
    61                     this.re / (that*1),  this.im / (that*1) 
    62                 ); 
     61                    this.re / (that*1),  this.im / (that*1) 
     62                ); 
    6363            } 
    6464        }, 
     
    6666            var abs = Math.exp(this.re); 
    6767            var arg = this.im; 
    68           return new Math.Complex(abs*Math.cos(arg), abs*Math.sin(arg)); 
     68            return new Math.Complex(abs*Math.cos(arg), abs*Math.sin(arg)); 
    6969        }, 
    7070        log:function(){ 
     
    9494            } 
    9595        }, 
    96         ne:function(that){ 
    97             return ! this.eq(that); 
    98         } 
     96    ne:function(that){ 
     97        return ! this.eq(that); 
     98    } 
    9999    }; 
    100100    /* functions exported for convenience */