From: Jay Belanger Date: Sun, 6 Mar 2011 04:36:15 +0000 (-0600) Subject: * calc/calc-units.el (math-midi-round): Translate calc-note-threshold X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~674^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8f60c8201658b7b0b5017986d2cb7e30479ec2d2;p=emacs.git * calc/calc-units.el (math-midi-round): Translate calc-note-threshold to an appropriate fraction. --- diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index f022f4f472b..7f0adc9fe7e 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -1869,7 +1869,8 @@ In symbolic mode, return the list (^ a b)." (let* ((n (math-round num)) (diff (math-abs (math-sub num n)))) - (if (< (math-compare diff (math-read-expr calc-note-threshold)) 0) + (if (< (math-compare diff + (math-div (math-read-expr calc-note-threshold) 100)) 0) n num)))