Skip to content

Commit daa6ea6

Browse files
committed
extract densify_by as const
1 parent ab101e6 commit daa6ea6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/curves.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ pub struct SphericalLineStringCurve {
258258
}
259259

260260
impl SphericalLineStringCurve {
261+
const DEFAULT_DENSIFY_BY: f64 = 100.0;
262+
261263
/// Splits the [`LineString`] into smaller [`Curve`]s of at most `max_len` length.
262264
/// If the initial geometry is invalid, it returns an empty vector.
263265
pub fn new_fragmented(geom: LineString, max_len: f64, max_extent: f64) -> Vec<Self> {
@@ -283,7 +285,7 @@ impl Curve for SphericalLineStringCurve {
283285
max_extent,
284286
geom,
285287
length,
286-
densify_by: 100., // arbitrary, maximum length of a curve will be 100m, otherwise it will be densified
288+
densify_by: Self::DEFAULT_DENSIFY_BY, // arbitrary, maximum length of a curve will be 100m, otherwise it will be densified
287289
}
288290
}
289291

0 commit comments

Comments
 (0)