mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-23 22:13:02 +02:00
20221228 revert the points length check
This commit is contained in:
parent
42494f95ab
commit
0b77fc6bf3
@ -84,8 +84,8 @@ impl Polygon {
|
||||
}
|
||||
|
||||
pub fn length(&self) -> f64 {
|
||||
if self.points.len() < 3 {
|
||||
return f64::NAN;
|
||||
if self.points.is_empty() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
let mut result = 0.0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user