Skip to content

Commit

Permalink
math: cos macro missing values::promote_int
Browse files Browse the repository at this point in the history
The cosine macro can't take an integer input without this fix. You can
see that some of the other macros, like the sine macro, have this.
  • Loading branch information
MendocinoWhiteDeer committed Dec 20, 2024
1 parent c76870c commit cb0eba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/math/math.c3
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ macro copysign(mag, sgn) => $$copysign(values::promote_int_same(mag, sgn), ($typ
<*
@require values::@is_promotable_to_floatlike(x) `The input must be a number value or float vector`
*>
macro cos(x) => $$cos(x);
macro cos(x) => $$cos(values::promote_int(x));

<*
@require values::@is_promotable_to_floatlike(x) `The input must be a number value or float vector`
Expand Down

0 comments on commit cb0eba5

Please sign in to comment.