-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Davide Effe
committed
Mar 11, 2018
1 parent
5aa8dab
commit 632ae73
Showing
13 changed files
with
309 additions
and
929 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "5" | ||
- "6" | ||
- "node" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
# Circumcenter Calculator | ||
|
||
## 1.2.0 | ||
|
||
* removed dependancy from MathJS | ||
* allow node `>=4.*` | ||
|
||
## 1.1.0 | ||
|
||
* fix error when trying to calculate with undefined slopes | ||
* fix 'singular matrix' error | ||
* fix 'singular matrix' error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
const circumcenterCalculator = (function() { | ||
const Calculator = require("./src/CircumcenterCalculator").Calculator; | ||
const Point = require("./src/Point").Point; | ||
var calculate = (function() { | ||
var calculate = require("./src/calculate").calculate; | ||
var Point = require("./src/Point").Point; | ||
|
||
exports.calculate = function(a, b, c) { | ||
return (new Calculator()).calculate(a, b, c); | ||
}; | ||
exports.calculate = calculate; | ||
exports.Point = Point; | ||
|
||
return exports; | ||
})(); | ||
|
||
if (typeof module.exports === "object") module.exports = circumcenterCalculator; | ||
if (typeof module.exports === "object") module.exports = calculate; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
const round = require("mathjs").round; | ||
var helpers = require("./helpers.js"); | ||
|
||
class Equation { | ||
constructor(coeffX, coeffY, constant) { | ||
this.x = round(coeffX, 5); | ||
this.y = round(coeffY, 5); | ||
this.constant = round(constant, 5); | ||
} | ||
|
||
toString() { | ||
return `${this.x}x ${this.y}y = ${this.constant}`; | ||
} | ||
function Equation(coeffX, coeffY, constant) { | ||
this.x = helpers.round(coeffX, 5); | ||
this.y = helpers.round(coeffY, 5); | ||
this.constant = helpers.round(constant, 5); | ||
} | ||
|
||
exports.Equation = Equation; | ||
Equation.prototype.toString = function() { | ||
return `${this.x}x ${this.y}y = ${this.constant}`; | ||
}; | ||
|
||
module.exports.Equation = Equation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
const round = require("mathjs").round; | ||
var round = require("./helpers").round; | ||
|
||
class Point { | ||
constructor(x, y) { | ||
this.x = round(x, 3); | ||
this.y = round(y, 3); | ||
} | ||
function Point(x, y) { | ||
this.x = round(x, 3); | ||
this.y = round(y, 3); | ||
}; | ||
|
||
toString() { | ||
return `${this.x}:${this.y}`; | ||
} | ||
} | ||
Point.prototype.toString = function() { | ||
return `${this.x}:${this.y}`; | ||
}; | ||
|
||
exports.Point = Point; | ||
module.exports.Point = Point; |
Oops, something went wrong.