Changeset 38265
- Timestamp:
- 08/14/10 04:22:57 (3 years ago)
- Files:
-
- 1 modified
-
lang/javascript/math-complex/trunk/complex.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/math-complex/trunk/complex.js
r38264 r38265 1 1 /* 2 * $Id: complex.js,v 0. 3 2010/08/13 17:39:18dankogai Exp dankogai $2 * $Id: complex.js,v 0.4 2010/08/13 19:18:44 dankogai Exp dankogai $ 3 3 */ 4 4 … … 38 38 sub:function(that){ 39 39 return (that.constructor === this.constructor) 40 ? new Math.Complex(this.re - that.re, this.im +that.im)40 ? new Math.Complex(this.re - that.re, this.im - that.im) 41 41 : new Math.Complex(this.re - that*1, this.im); 42 42 }, … … 85 85 ); 86 86 } 87 } 87 }, 88 eq:function(that){ 89 if (that.constructor === this.constructor){ 90 return this.re === that.re && this.im === that.im; 91 }else{ 92 return this.eq(new Math.Complex(that, 0)); 93 } 94 }, 95 lt:function(that){ 96 if (that.constructor === this.constructor){ 97 return this.re === that.re && this.im === that.im; 98 }else{ 99 return this.lt(new Math.Complex(that, 0)); 100 } 101 }, 88 102 }; 89 103 /* functions exported for convenience */
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)