Sha256: 9950bdc2166b0d9603e77165169dc2d08bef0a9a9d4bc34d49da61f9e70c9cdd
Contents?: true
Size: 863 Bytes
Versions: 6
Compression:
Stored size: 863 Bytes
Contents
describe("Transformation", function () { var t, p; beforeEach(function () { t = new L.Transformation(1, 2, 3, 4); p = new L.Point(10, 20); }); describe('#transform', function () { it("performs a transformation", function () { var p2 = t.transform(p, 2); expect(p2).to.eql(new L.Point(24, 128)); }); it('assumes a scale of 1 if not specified', function () { var p2 = t.transform(p); expect(p2).to.eql(new L.Point(12, 64)); }); }); describe('#untransform', function () { it("performs a reverse transformation", function () { var p2 = t.transform(p, 2); var p3 = t.untransform(p2, 2); expect(p3).to.eql(p); }); it('assumes a scale of 1 if not specified', function () { var p2 = t.transform(p); expect(t.untransform(new L.Point(12, 64))).to.eql(new L.Point(10, 20)); }); }); });
Version data entries
6 entries across 6 versions & 1 rubygems