Commit graph

9 commits

Author SHA1 Message Date
Biggles Bristol c920a4f051 [Fixed] for "off-by-1" bug when sampling "baked" curve data towards the end of the curve.
[Fixed] Failing test "[Curve] Custom curve with free tangents" by setting the curve's `bake_resolution` to 11.
[Fixed] test messages in "[Curve] Custom curve with free tangents" to match sample offset used in each test
[Added] New test "[Curve] Straight line offset test" in response to pull request feedback.
Update tests/scene/test_curve.h

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2023-05-20 11:28:09 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Hendrik Brucker 0b07da8ebc [Tests] Get rid of several error messages when running the test suite 2022-12-12 19:17:50 +01:00
Yaohua Xiong 91e9ad92f5 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.
2022-12-05 21:22:05 +08:00
Hendrik Brucker f906ff8f89 [Tests] Replace Math::is_equal_approx with == and doctest::Approx 2022-11-05 02:28:00 +01:00
Hugo Locurcio ae18928748
Rename Curve/Curve2D/Curve3D/Gradient interpolate() to sample()
"sampling" is a more accurate term than "interpolating" for what's
happening when using that function.
2022-08-30 22:08:38 +02:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Aaron Franke 129911f61a
Improve Curve with const and real_t 2021-11-30 14:24:27 -06:00
Aaron Franke 99a282f631
Move and organize tests into subfolders 2021-11-07 00:43:31 -06:00
Renamed from tests/test_curve.h (Browse further)