* complex.c (f_signbit): fixed indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
82fa04e212
commit
2a3d58d692
@ -891,23 +891,20 @@ inline static VALUE
|
||||
f_signbit(VALUE x)
|
||||
{
|
||||
switch (TYPE(x)) {
|
||||
case T_FLOAT:
|
||||
case T_FLOAT: {
|
||||
#ifdef HAVE_SIGNBIT
|
||||
{
|
||||
double f = RFLOAT_VALUE(x);
|
||||
return f_boolcast(!isnan(f) && signbit(f));
|
||||
}
|
||||
#else
|
||||
{
|
||||
char s[2];
|
||||
double f = RFLOAT_VALUE(x);
|
||||
|
||||
if (isnan(f)) return Qfalse;
|
||||
(void)snprintf(s, sizeof s, "%.0f", f);
|
||||
return f_boolcast(s[0] == '-');
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return f_negative_p(x);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user