Method: OraNumber#round
- Defined in:
- ext/oci8/ocinumber.c
#round ⇒ Integer #round(decplace) ⇒ OraNumber
1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 |
# File 'ext/oci8/ocinumber.c', line 1203
static VALUE onum_round(int argc, VALUE *argv, VALUE self)
{
OCIError *errhp = oci8_errhp;
VALUE decplace;
OCINumber r;
rb_scan_args(argc, argv, "01", &decplace /* 0 */);
chkerr(OCINumberRound(errhp, _NUMBER(self), NIL_P(decplace) ? 0 : NUM2INT(decplace), &r));
if (argc == 0) {
return oci8_make_integer(&r, errhp);
} else {
return oci8_make_ocinumber(&r, errhp);
}
}
|