Browse Source

rename redundant point.pointFromX to point.fromX

patch-2
Ryan X. Charles 10 years ago
parent
commit
9f7e01b8ca
  1. 2
      lib/point.js
  2. 4
      test/test.point.js

2
lib/point.js

@ -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());

4
test/test.point.js

@ -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);
});

Loading…
Cancel
Save