MCPcopy Create free account
hub / github.com/Logicalshift/flowbetween / simplify

Method simplify

flo/src/scenery/canvas/shape/working_path.rs:121–141  ·  view source on GitHub ↗

Attempts to simplify a cubic curve to a line or quadratic curve if it fits within the given error bound. Returns the simplified action, or the original action if no simplification is possible. For a cubic curve starting at `current_point`: - Returns a Line if both control points lie on the line between start and end within `max_error` - Returns a QuadraticCurve if the cubic can be represented as

(&self, current_point: WorkingPoint, max_error: f64)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

simplify_in_placeMethod · 0.80

Calls 4

cloneMethod · 0.45
lenMethod · 0.45
end_pointMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected