mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Export mrb_int_value that converts mrb_float to Fixnum.
Or `Float` if `mrb_float` value is too big (or too small) to fit in `mrb_int`. The `_int_` in `mrb_int_value` means `Integral` module, which represents integer-like values in mruby.
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ mrb_to_flo(mrb_state *mrb, mrb_value val)
|
||||
return mrb_float(val);
|
||||
}
|
||||
|
||||
static mrb_value
|
||||
MRB_API mrb_value
|
||||
mrb_int_value(mrb_state *mrb, mrb_float f)
|
||||
{
|
||||
if (FIXABLE_FLOAT(f)) {
|
||||
|
||||
Reference in New Issue
Block a user