Skip to content

Commit f120e7d

Browse files
committed
Refactor vector_macros
1 parent 4c06b58 commit f120e7d

File tree

3 files changed

+517
-118
lines changed

3 files changed

+517
-118
lines changed

godot-core/src/builtin/math/float.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub trait FloatExt: private::Sealed + Copy {
3232
/// Check if `self` is within [`Self::CMP_EPSILON`] of `0.0`.
3333
fn is_zero_approx(self) -> bool;
3434

35+
/// Returns the floating-point modulus of `self` divided by `pmod`, wrapping equally in positive and negative.
3536
fn fposmod(self, pmod: Self) -> Self;
3637

3738
/// Returns the multiple of `step` that is closest to `self`.

godot-core/src/builtin/math/glam_helpers.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ use crate::builtin::real;
2121
pub(crate) trait GlamConv {
2222
type Glam: GlamType<Mapped = Self>;
2323

24+
#[inline]
2425
fn to_glam(&self) -> Self::Glam {
2526
Self::Glam::from_front(self)
2627
}
2728

29+
#[inline]
2830
fn glam<F, R>(&self, unary_fn: F) -> R::Mapped
2931
where
3032
R: GlamType,
@@ -36,6 +38,7 @@ pub(crate) trait GlamConv {
3638
result.to_front()
3739
}
3840

41+
#[inline]
3942
fn glam2<F, P, R>(&self, rhs: &P, binary_fn: F) -> R::Mapped
4043
where
4144
P: GlamConv,

0 commit comments

Comments
 (0)