mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-07 04:58:11 +08:00
Make certain Bezier function parameters optional and other refactors (#713)
* Make certain parameters optional * Use builder pattern for project function's optional parameters * Address comments posted in bezier-math-lib discord channel * Minor changes to text * Address PR comments * Fix index.html * Nit * Replace builder pattern with simple struct * Move constants to a separate file Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
9ed9db7009
commit
f3d5028107
@@ -0,0 +1,14 @@
|
||||
/// Default `t` value used for the `curve_through_points` functions
|
||||
pub const DEFAULT_T_VALUE: f64 = 0.5;
|
||||
|
||||
/// Default LUT step size in `compute_lookup_table` function
|
||||
pub const DEFAULT_LUT_STEP_SIZE: i32 = 10;
|
||||
|
||||
/// Number of subdivisions used in `length` calculation
|
||||
pub const LENGTH_SUBDIVISIONS: i32 = 1000;
|
||||
|
||||
/// Number of distances used in search algorithm for `project`
|
||||
pub const NUM_DISTANCES: usize = 5;
|
||||
|
||||
/// Constants used to determine if `f64`'s are equivalent
|
||||
pub const MAX_ABSOLUTE_DIFFERENCE: f64 = 1e-3;
|
||||
Reference in New Issue
Block a user