{"action":"created","issue":{"url":"https://api.github.com/repos/sass-eyeglass/eyeglass-math/issues/2","labels_url":"https://api.github.com/repos/sass-eyeglass/eyeglass-math/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/sass-eyeglass/eyeglass-math/issues/2/comments","events_url":"https://api.github.com/repos/sass-eyeglass/eyeglass-math/issues/2/events","html_url":"https://github.com/sass-eyeglass/eyeglass-math/pull/2","id":110565130,"number":2,"title":"Add roundTo function","user":{"login":"benhinchley","id":7188324,"avatar_url":"https://avatars.githubusercontent.com/u/7188324?v=3","gravatar_id":"","url":"https://api.github.com/users/benhinchley","html_url":"https://github.com/benhinchley","followers_url":"https://api.github.com/users/benhinchley/followers","following_url":"https://api.github.com/users/benhinchley/following{/other_user}","gists_url":"https://api.github.com/users/benhinchley/gists{/gist_id}","starred_url":"https://api.github.com/users/benhinchley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benhinchley/subscriptions","organizations_url":"https://api.github.com/users/benhinchley/orgs","repos_url":"https://api.github.com/users/benhinchley/repos","events_url":"https://api.github.com/users/benhinchley/events{/privacy}","received_events_url":"https://api.github.com/users/benhinchley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-09T00:07:08Z","updated_at":"2015-10-09T23:33:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sass-eyeglass/eyeglass-math/pulls/2","html_url":"https://github.com/sass-eyeglass/eyeglass-math/pull/2","diff_url":"https://github.com/sass-eyeglass/eyeglass-math/pull/2.diff","patch_url":"https://github.com/sass-eyeglass/eyeglass-math/pull/2.patch"},"body":"I added a roundTo function to the numeric functions. I often find myself working with numbers that I want rounded to a certain number of decimal places, and in the past have built this functaionality with a large sass function."},"comment":{"url":"https://api.github.com/repos/sass-eyeglass/eyeglass-math/issues/comments/147011166","html_url":"https://github.com/sass-eyeglass/eyeglass-math/pull/2#issuecomment-147011166","issue_url":"https://api.github.com/repos/sass-eyeglass/eyeglass-math/issues/2","id":147011166,"user":{"login":"eoneill","id":552715,"avatar_url":"https://avatars.githubusercontent.com/u/552715?v=3","gravatar_id":"","url":"https://api.github.com/users/eoneill","html_url":"https://github.com/eoneill","followers_url":"https://api.github.com/users/eoneill/followers","following_url":"https://api.github.com/users/eoneill/following{/other_user}","gists_url":"https://api.github.com/users/eoneill/gists{/gist_id}","starred_url":"https://api.github.com/users/eoneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eoneill/subscriptions","organizations_url":"https://api.github.com/users/eoneill/orgs","repos_url":"https://api.github.com/users/eoneill/repos","events_url":"https://api.github.com/users/eoneill/events{/privacy}","received_events_url":"https://api.github.com/users/eoneill/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T23:33:17Z","updated_at":"2015-10-09T23:33:17Z","body":"I would suggest simplifying the implementation to...\r\n\r\n```scss\r\n@function to-fixed($number, $n: 0) {\r\n  $n: math-pow(10, $n);\r\n  @return round($number * $n) / $n;\r\n}\r\n```\r\n\r\nThis will correctly preserve units for you (e.g. `to-fixed(5.4321px, 2) // -> 5.43px`) and doesn't need an extra javascript function."}}