chore: rebase

pull/38/head
alestiago 4 years ago
parent fe4ad779ea
commit a5accacd37

@ -162,32 +162,23 @@ void main() {
expect(() => centroid([]), throwsAssertionError);
});
test(
'is correct when one vertex is given',
() {
expect(centroid([Vector2.zero()]), Vector2.zero());
},
);
test(
'is correct when two vertex are given',
() {
expect(centroid([Vector2.zero(), Vector2(1, 1)]), Vector2(0.5, 0.5));
},
);
test(
'is correct when three vertex are given',
() {
expect(
centroid([
Vector2.zero(),
Vector2(1, 1),
Vector2(2, 2),
]),
test('is correct when one vertex is given', () {
expect(centroid([Vector2.zero()]), Vector2.zero());
});
test('is correct when two vertex are given', () {
expect(centroid([Vector2.zero(), Vector2(1, 1)]), Vector2(0.5, 0.5));
});
test('is correct when three vertex are given', () {
expect(
centroid([
Vector2.zero(),
Vector2(1, 1),
);
},
);
Vector2(2, 2),
]),
Vector2(1, 1),
);
});
});
}

Loading…
Cancel
Save