mirror of
https://github.com/hannobraun/Fornjot
synced 2025-11-01 20:58:17 +00:00
Rename method
It's the only constructor left, so it can have the traditional name of a constructor without loss of clarity.
This commit is contained in:
parent
d5876b9650
commit
3437463070
@ -28,7 +28,7 @@ impl Approximation {
|
||||
///
|
||||
/// `tolerance` defines how far the approximation is allowed to deviate from
|
||||
/// the actual edges.
|
||||
pub fn for_face(face: &Face, tolerance: Scalar) -> Self {
|
||||
pub fn new(face: &Face, tolerance: Scalar) -> Self {
|
||||
// Curved faces whose curvature is not fully defined by their edges
|
||||
// are not supported yet. For that reason, we can fully ignore `face`'s
|
||||
// `surface` field and just pass the edges to `Self::for_edges`.
|
||||
@ -203,7 +203,7 @@ mod tests {
|
||||
};
|
||||
|
||||
assert_eq!(
|
||||
Approximation::for_face(&face, tolerance),
|
||||
Approximation::new(&face, tolerance),
|
||||
Approximation {
|
||||
points: set![a, b, c, d],
|
||||
segments: set![
|
||||
|
||||
@ -25,7 +25,7 @@ pub fn triangulate(
|
||||
match &*face {
|
||||
Face::Face { surface, color, .. } => {
|
||||
let surface = surface.get();
|
||||
let approx = Approximation::for_face(&face, tolerance);
|
||||
let approx = Approximation::new(&face, tolerance);
|
||||
|
||||
let points: Vec<_> = approx
|
||||
.points
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user