mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-06 13:58:12 +08:00
Bezier-rs: Updated Bezier function signatures to accept TValue (#967)
* Create helper for converting d to t values * Add euclidean option for tangent and normal * Modified bezier functions signatures to accept ComputeType * Stylistic changes per review * Added ComputeType documentation * Renamed ComputeType to TValue * Fixed comments * Fixed failing unit tests * Code review * Fix comments in code review * Renamed compute_type_to_parametric to t_value_to_parametric --------- Co-authored-by: Linda Zheng <thelindazheng@gmail.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Linda Zheng
Keavon Chambers
parent
f0ad4c91d3
commit
a64c856ec4
@@ -10,6 +10,8 @@ pub const NUM_DISTANCES: usize = 5;
|
||||
pub const SCALABLE_CURVE_MAX_ENDPOINT_NORMAL_ANGLE: f64 = std::f64::consts::PI / 3.;
|
||||
/// Minimum allowable separation between adjacent `t` values when calculating curve intersections
|
||||
pub const MIN_SEPERATION_VALUE: f64 = 5. * 1e-3;
|
||||
/// Default error bound for `t_value_to_parametric` function when TValue argument is Euclidean
|
||||
pub const DEFAULT_EUCLIDEAN_ERROR_BOUND: f64 = 0.001;
|
||||
|
||||
// Method argument defaults
|
||||
|
||||
|
||||
Reference in New Issue
Block a user