equal
deleted
inserted
replaced
498 } |
498 } |
499 Self { vertices: v } |
499 Self { vertices: v } |
500 } |
500 } |
501 |
501 |
502 pub fn edges_count(&self) -> usize { |
502 pub fn edges_count(&self) -> usize { |
503 self.vertices.len() - 1 |
503 self.vertices.len().saturating_sub(1) |
504 } |
504 } |
505 |
505 |
506 pub fn get_edge(&self, index: usize) -> Line { |
506 pub fn get_edge(&self, index: usize) -> Line { |
507 Line::new(self.vertices[index], self.vertices[index + 1]) |
507 Line::new(self.vertices[index], self.vertices[index + 1]) |
508 } |
508 } |