Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
Use Math polyfills instead of Math.js functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tcannonfodder committed Jul 3, 2016
1 parent a8a649a commit 04777f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion static/js/docking_position_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var DockingPositionData = Class.create({
relativePositionVector[1],
]

return math.add(frameOfReferenceVector, transformedRelativePositionVector)
return Math.matrixAdd(frameOfReferenceVector, transformedRelativePositionVector)
},

adjustUniversalTime: function(ut){
Expand Down
7 changes: 5 additions & 2 deletions static/js/position_data_formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ var PositionDataFormatter = Class.create({

findProjectedPositionOfReferenceBody: function(rootReferenceBody, body, universalTime){
var distancePoints = this.findDistanceVectorBetweenBodiesAtTime(rootReferenceBody, body, universalTime)
var distanceVector = math.add(distancePoints[1], math.multiply(-1, distancePoints[0]))
var distanceVector = Math.matrixAdd(
distancePoints[1],
Math.scaleMatrix(-1, distancePoints[0])
)
return distanceVector
},

Expand All @@ -229,7 +232,7 @@ var PositionDataFormatter = Class.create({
relativePositionVector[1],
]

return math.add(frameOfReferenceVector, transformedRelativePositionVector)
return Math.matrixAdd(frameOfReferenceVector, transformedRelativePositionVector)
},

findTruePositionClosestToRelativeTime: function(universalTime, positionData){
Expand Down

0 comments on commit 04777f3

Please sign in to comment.