paper.js/test/tests/Path_Length.js
2011-03-06 14:58:10 +00:00

10 lines
340 B
JavaScript

module('Path Length');
test('path.length', function() {
var doc = new Document();
var path = new Path([
new Segment(new Point(121, 334), new Point(-19, 38), new Point(30.7666015625, -61.53369140625)),
new Segment(new Point(248, 320), new Point(-42, -74), new Point(42, 74))
]);
compareNumbers(path.length, 172.10122680664062);
});