{"action":"created","issue":{"url":"https://api.github.com/repos/rin01/decnum/issues/3","labels_url":"https://api.github.com/repos/rin01/decnum/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/rin01/decnum/issues/3/comments","events_url":"https://api.github.com/repos/rin01/decnum/issues/3/events","html_url":"https://github.com/rin01/decnum/issues/3","id":103753154,"number":3,"title":"add 'Round' and 'Truncate' methods","user":{"login":"rin01","id":9582469,"avatar_url":"https://avatars.githubusercontent.com/u/9582469?v=3","gravatar_id":"","url":"https://api.github.com/users/rin01","html_url":"https://github.com/rin01","followers_url":"https://api.github.com/users/rin01/followers","following_url":"https://api.github.com/users/rin01/following{/other_user}","gists_url":"https://api.github.com/users/rin01/gists{/gist_id}","starred_url":"https://api.github.com/users/rin01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rin01/subscriptions","organizations_url":"https://api.github.com/users/rin01/orgs","repos_url":"https://api.github.com/users/rin01/repos","events_url":"https://api.github.com/users/rin01/events{/privacy}","received_events_url":"https://api.github.com/users/rin01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T16:41:40Z","updated_at":"2015-08-30T16:10:57Z","closed_at":null,"body":"`Quantize` method should be sufficient, but for an easier use of the package, I think that adding Round and Truncate method can be a good thing, like in Ruby:\r\nhttp://apidock.com/ruby/v1_9_3_392/BigDecimal/round\r\n\r\n    ctx.Round(val, n, rounding_mode)\r\n\r\nwhere n is the digit position at which rounding is done.\r\n\r\nctx.Round(123.45678, 2, ROUND_HALF_EVEN) gives 123.46\r\nctx.Round(123.45678, -1, ROUND_HALF_EVEN) gives 12e1 or 120 ? (don't know yet...)\r\n\r\nTruncate has rounding mode ROUND_DOWN.\r\n"},"comment":{"url":"https://api.github.com/repos/rin01/decnum/issues/comments/136156448","html_url":"https://github.com/rin01/decnum/issues/3#issuecomment-136156448","issue_url":"https://api.github.com/repos/rin01/decnum/issues/3","id":136156448,"user":{"login":"rin01","id":9582469,"avatar_url":"https://avatars.githubusercontent.com/u/9582469?v=3","gravatar_id":"","url":"https://api.github.com/users/rin01","html_url":"https://github.com/rin01","followers_url":"https://api.github.com/users/rin01/followers","following_url":"https://api.github.com/users/rin01/following{/other_user}","gists_url":"https://api.github.com/users/rin01/gists{/gist_id}","starred_url":"https://api.github.com/users/rin01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rin01/subscriptions","organizations_url":"https://api.github.com/users/rin01/orgs","repos_url":"https://api.github.com/users/rin01/repos","events_url":"https://api.github.com/users/rin01/events{/privacy}","received_events_url":"https://api.github.com/users/rin01/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T16:10:57Z","updated_at":"2015-08-30T16:10:57Z","body":"Ok, it is done. But I must write some tests."}}