mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Refactor baking code for Curve2D
The main change is to caculate tangent directly from bezier curve, without going through discretized polyline, avoiding pitfalls of discretization. A similar refacor had been applied to Curve3D. The test cases for Curve2D is updated, comparing floating point with is_equal_approxmiate() instead of `==`, in order to avoid float precision problem.
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
<param index="2" name="end" type="Vector2" />
|
||||
<param index="3" name="t" type="float" />
|
||||
<description>
|
||||
Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
|
||||
Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_interpolate" qualifiers="const">
|
||||
@@ -103,7 +103,7 @@
|
||||
<param index="2" name="end" type="Vector2" />
|
||||
<param index="3" name="t" type="float" />
|
||||
<description>
|
||||
Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
|
||||
Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bounce" qualifiers="const">
|
||||
|
||||
Reference in New Issue
Block a user