Guest User

Untitled

a guest
Jan 20th, 2021
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class Polygone is export {
  2.  
  3. has @.coordonnees ;
  4.  
  5. method new (**@points where all (@points>>.elems) == 2) {
  6. my @coordonnees;
  7. for @points -> ($x is raw , $y is raw) {
  8. @coordonnees.push(Point.new($x,$y));
  9. }
  10. self.bless(:@coordonnees);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment