mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
numeric.c: move FloatDomainError description to the sufficient place.
This commit is contained in:
+14
-14
@@ -795,6 +795,20 @@ flo_finite_p(mrb_state *mrb, mrb_value num)
|
||||
return mrb_bool_value(isfinite(mrb_float(num)));
|
||||
}
|
||||
|
||||
/*
|
||||
* Document-class: FloatDomainError
|
||||
*
|
||||
* Raised when attempting to convert special float values
|
||||
* (in particular infinite or NaN)
|
||||
* to numerical classes which don't support them.
|
||||
*
|
||||
* Float::INFINITY.to_i
|
||||
*
|
||||
* <em>raises the exception:</em>
|
||||
*
|
||||
* FloatDomainError: Infinity
|
||||
*/
|
||||
/* ------------------------------------------------------------------------*/
|
||||
void
|
||||
mrb_check_num_exact(mrb_state *mrb, mrb_float num)
|
||||
{
|
||||
@@ -1565,20 +1579,6 @@ int_to_f(mrb_state *mrb, mrb_value num)
|
||||
return mrb_float_value(mrb, (mrb_float)mrb_integer(num));
|
||||
}
|
||||
|
||||
/*
|
||||
* Document-class: FloatDomainError
|
||||
*
|
||||
* Raised when attempting to convert special float values
|
||||
* (in particular infinite or NaN)
|
||||
* to numerical classes which don't support them.
|
||||
*
|
||||
* Float::INFINITY.to_i
|
||||
*
|
||||
* <em>raises the exception:</em>
|
||||
*
|
||||
* FloatDomainError: Infinity
|
||||
*/
|
||||
/* ------------------------------------------------------------------------*/
|
||||
MRB_API mrb_value
|
||||
mrb_float_to_integer(mrb_state *mrb, mrb_value x)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user