Jump to content

Bézier curves/Intersections: Difference between revisions

→‎C implementation 2: Added gnu::const attributes to try to help an optimizer.
(→‎C implementation 2: Added gnu::const attributes to try to help an optimizer.)
Line 605:
 
// Convert a non-parametric spline from Bernstein basis to s-power.
[[gnu::const]] spower_spline
bernstein_spline_to_spower (bernstein_spline S)
{
Line 628:
// requires two applications of de Casteljau subdivision. On the other
// hand, subdivision requires two applications of the following.
[[gnu::const]] inline spower_spline
spower_spline_portion (spower_spline S, double t0, double t1)
{
Line 645:
}
 
[[gnu::const]] inline spower_curve
spower_curve_portion (spower_curve C, double t0, double t1)
{
Line 658:
// Given a parametric curve, is it "flat enough" to have its quadratic
// terms removed?
[[gnu::const]] inline bool
bool
flat_enough (spower_curve C, double tol)
{
1,448

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.