rename redundant point.pointFromX to point.fromX

This commit is contained in:
Ryan X. Charles 2014-08-06 21:39:25 -07:00
parent 8106bed6d0
commit 9f7e01b8ca
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ var p = ec.curve.point();
var Curve = Object.getPrototypeOf(ec.curve);
Point.prototype = Object.getPrototypeOf(p);
Point.pointFromX = ec.curve.pointFromX.bind(ec.curve);
Point.fromX = ec.curve.pointFromX.bind(ec.curve);
Point.getG = function() {
var p = Point(ec.curve.g.getX(), ec.curve.g.getY());

View File

@ -79,11 +79,11 @@ describe('point', function() {
});
describe('#pointFromX', function() {
describe('#fromX', function() {
it('should return g', function() {
var g = point.getG();
var p = point.pointFromX(false, g.getX());
var p = point.fromX(false, g.getX());
g.eq(p).should.equal(true);
});