Closed slime73 closed 11 years ago
Original comment by Matthias Richter (Bitbucket: vrld, GitHub: vrld).
The degree is a defining characteristic of a Bezier curve (see here). It just so happens that degree is number-of-control-points - 1.
Other kinds of (piecewise) polynomial curves may have different relationships, e.g. B-Spline curves, where the number of control points is (almost) not related to the degree of the curve.
Original comment by Alex Szpakowski (Bitbucket: slime73, GitHub: slime73).
Maybe it would be a good idea to add getControlPointCount
(even though it's a bit of a mouthful) without removing getDegree
?
LÖVE's API tends to consistently provide something like:
#!Lua
for i=1, Foo:getBarCount() do
Foo:setBar(i, ...)
end
which getControlPointCount
fits in with - but getDegree
also has meaning beyond just the number of control points.
Original report by hahawoo (Bitbucket: hahawoo, GitHub: hahawoo).
As always I have no idea what I'm talking about, but would
getControlPointCount
be better thangetDegree
?getControlPointCount
does.get*Count
functions.is maybe kind of easier to understand than