mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 09:48:12 +08:00
Implement curvature function in Bezier math library (#725)
* bezier curvature * change comment Co-authored-by: Jackie Chen <jackiechen73>
This commit is contained in:
co-authored by
Jackie Chen
parent
b4070f9c90
commit
18871e5bbf
@@ -166,4 +166,8 @@ impl WasmBezier {
|
||||
let bezier_points: Vec<Vec<Point>> = self.0.offset(distance).into_iter().map(bezier_to_points).collect();
|
||||
to_js_value(bezier_points)
|
||||
}
|
||||
|
||||
pub fn curvature(&self, t: f64) -> f64 {
|
||||
self.0.curvature(t)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user