Skip to content

Commit aa29628

Browse files
fix: make fmod take the correct amount of parameters (#535)
The previous version of the std::math::fmod function only took one argument which was incorrect and rendered the function impossible to use. This patch fixes this issue by making the std::math::fmod function take 2 arguments (numerator and denominator) so the remainder of the division can be effectively calculated.
1 parent ecbf153 commit aa29628

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

includes/std/math.pat

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,12 @@ namespace auto std::math {
183183
fn ln(auto value) { return builtin::std::math::ln(value); };
184184

185185
/**
186-
Calculates the floating point modulus of `value`.
187-
@param value Value
188-
@return Floating point modulus of `value`
186+
Calculates the floating point modulus (remainder) of the division of `x` by `y`.
187+
@param x Numerator
188+
@param y Denominator
189+
@return Floating point modulus (remainder) of the division of `x` by `y`
189190
*/
190-
fn fmod(auto value) { return builtin::std::math::fmod(value); };
191+
fn fmod(auto x, auto y) { return builtin::std::math::fmod(x, y); };
191192

192193
/**
193194
Calculates the value of `base` raised to the power of `exp`.

0 commit comments

Comments
 (0)