goostengine / goost

A general-purpose, extensible and customizable C++ extension for Godot Engine.
https://goostengine.github.io/
MIT License
481 stars 18 forks source link

Add `GoostMath` singleton #153

Closed Xrayez closed 3 years ago

Xrayez commented 3 years ago

This will be the home for math functions in Goost, see #151.

Implemented Bezier interpolation:

image

and Catmull-Rom interpolation functions which is similar to #77.

Both support float, Vector2 and Vector3.

Added is_equal_approx() and is_zero_approx() with configurable tolerance which is impossible to configure in Godot's is_equal_approx(). CMP_EPSILON is not exposed either, see godotengine/godot-proposals#3565, unfortunately there's no way to bind float-based constants even via modules.