]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily-library.scm
*** empty log message ***
[lilypond.git] / scm / lily-library.scm
index 3ad2d2764b865c17241e2d568315c5c7e8dee2ca..d3e75530a3e99678f4ca2f86709554e32065214d 100644 (file)
@@ -316,6 +316,9 @@ found."
       (cons (cons (car coords) (cadr coords))
            (ly:list->offsets accum (cddr coords)))))
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; intervals
+
 (define-public (interval-length x)
   "Length of the number-pair X, when an interval"
   (max 0 (- (cdr x) (car x))))
@@ -350,6 +353,16 @@ found."
    (cons (min (car i1) (car i2))
         (max (cdr i1) (cdr i2))))
 
+(define-public (interval-sane? i)
+  (not (or  (nan? (car i))
+           (inf? (car i))
+           (nan? (cdr i))
+           (inf? (cdr i)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+
+
 (define-public (write-me message x)
   "Return X.  Display MESSAGE and write X.  Handy for debugging,
 possibly turned off."