lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quick test for interval containing interval


From: address@hidden
Subject: Quick test for interval containing interval
Date: Sat, 10 Dec 2011 13:04:12 +0100

Hey all,

Before I reinvent the wheel, does the code base have something like 
Interval::contains that accepts an interval as an argument instead of a point?

I could do

Interval foo(-1,1);
Interval bar (0, 2);

Direction d = LEFT;
contains = false;
do
{
  contains |= foo.contains(bar[d]);
}
while (flip (&d) != LEFT);

to get the result, but it seems like this sorta thing would exist already in 
the code base (I couldn't find it scanning interval.hh and interval.tcc).  Any 
ideas?

Cheers,
MS


reply via email to

[Prev in Thread] Current Thread [Next in Thread]