ApproxEq
trait + refactorings
#314
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
Add
ApproxEq
trait and implement it for many builtin types.assert_eq_approx!(a, b, is_equal_approx)
.assert_eq_approx!(a, b, fn = is_equal_approx)
.Refactor modules
godot::builtin::math
is now a public module, which contains:lerp
,sign
ApproxEq
trait +assert_eq_approx!
,assert_ne_approx!
macrosIVec4
,GlamConv
, etc (internal)godot::builtin
. If this turns out to be an issue, we can also revert this in the future; but it might help some discoverability. Some symbols could also be considered to be part of the prelude.godot::native_structure
->godot::engine::native
real
-related symbols into their ownreal.rs
file (internal; API unaffected).Refactor import statements (just around geometric types, not whole codebase)