Skip to content

Commit

Permalink
Handle very *very* small nice-nums
Browse files Browse the repository at this point in the history
  • Loading branch information
rm-hull committed Mar 20, 2016
1 parent 231681c commit 66576d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/graph/heckbert.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[x round]
{:pre [(>= x 0)]}
(let [exp (Math/floor (Math/log10 x))
f (/ x (Math/pow 10 exp))
d (Math/pow 10 exp)
f (/ x (if (zero? d) 1 d))
nf (if round
(condp > f
1.5 1.0
Expand Down

0 comments on commit 66576d5

Please sign in to comment.