-
-
Save headius/99920294543eb3b6e3a1d61592c3ae9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* call-seq: | |
* cmp.finite? -> true or false | |
* | |
* Returns +true+ if +cmp+'s magnitude is a finite number, | |
* otherwise returns +false+. | |
*/ | |
static VALUE | |
rb_complex_finite_p(VALUE self) | |
{ | |
get_dat1(self); | |
if (f_finite_p(dat->real) && f_finite_p(dat->imag)) { | |
return Qtrue; | |
} | |
return Qfalse; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment