RoundToIntegralExact sets d to integral value of x.
(d, x *Decimal)
| 1245 | |
| 1246 | // RoundToIntegralExact sets d to integral value of x. |
| 1247 | func (c *Context) RoundToIntegralExact(d, x *Decimal) (Condition, error) { |
| 1248 | if set, res, err := c.toIntegralSpecials(d, x); set { |
| 1249 | return res, err |
| 1250 | } |
| 1251 | res := c.toIntegral(d, x) |
| 1252 | return c.goError(res) |
| 1253 | } |
| 1254 | |
| 1255 | // Ceil sets d to the smallest integer >= x. |
| 1256 | func (c *Context) Ceil(d, x *Decimal) (Condition, error) { |