pub fn direction_for_path(path: &BezPath) -> Result<Direction, BooleanOperationError> {
		let mut area = 0.0;
		path.segments().for_each(|path_segment| area += path_segment.signed_area());
		if area > 0.0 {
			Ok(Direction::Ccw)
		} else if area < 0.0 {
			Ok(Direction::Cw)
		} else {
			Err(BooleanOperationError::DirectionUndefined)
		}
	}
/// If the path is empty (has no segments), the function `Err`s.
/// If the path crosses itself, the computed direction may (or probably will) be wrong, on account of it not really being defined.
If the path is empty (has no segments), the function `Err`s.
If the path crosses itself, the computed direction may (or probably will) be wrong, on account of it not really being defined.
If the path is empty ( has no segments ) the function ` Err ` s . If the path crosses itself the computed direction may ( or probably will ) be wrong on account of it not really being defined .
pub fn direction_for_path(path: &BezPath) -> Result<Direction, BooleanOperationError> {
		let mut area = 0.0;
		path.segments().for_each(|path_segment| area += path_segment.signed_area());
		if area > 0.0 {
			Ok(Direction::Ccw)
		} else if area < 0.0 {
			Ok(Direction::Cw)
		} else {
			Err(BooleanOperationError::DirectionUndefined)
		}
	}
pub fn direction_for_path ( path : & BezPath ) -> Result < Direction , BooleanOperationError > { let mut area = 0.0 ; path . segments ( ) . for_each ( | path_segment | area += path_segment . signed_area ( ) ) ; if area > 0.0 { Ok ( Direction :: Ccw ) } else if area < 0.0 { Ok ( Direction :: Cw ) } else { Err ( BooleanOperationError :: DirectionUndefined ) } }
If the path is empty (has no segments), the function `Err`s.
If the path is empty ( has no segments ) the function ` Err ` s .
path
&BezPath
path
&BezPath