Skip to content

Commit

Permalink
make Vector.norm() more visible
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Stephens committed Mar 15, 2015
1 parent c43386e commit 434f95d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/orbit.js
Expand Up @@ -41,10 +41,10 @@ Orbit.prototype.eccentricity = function eccentricity() {
};

Orbit.prototype.semimajorAxis = function semimajorAxis() {
var h = this.angularMomentum(),
e = this.eccentricity();
return (Math.pow(h.norm(), 2) / this.mu) *
(1 / (1 - Math.pow(e.norm(), 2)));
var h = this.angularMomentum().norm(),
e = this.eccentricity().norm();
return (Math.pow(h, 2) / this.mu) *
(1 / (1 - Math.pow(e, 2)));
};

Orbit.prototype.semiminorAxis = function semiminorAxis() {
Expand Down

0 comments on commit 434f95d

Please sign in to comment.