You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-26 02:31:00 +02:00
20221228 revert the points length check
This commit is contained in:
@ -84,8 +84,8 @@ impl Polygon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn length(&self) -> f64 {
|
pub fn length(&self) -> f64 {
|
||||||
if self.points.len() < 3 {
|
if self.points.is_empty() {
|
||||||
return f64::NAN;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut result = 0.0;
|
let mut result = 0.0;
|
||||||
|
Reference in New Issue
Block a user