2 pitch-interval.cc -- implement Pitch_interval
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #include "pitch-interval.hh"
12 #include "interval.tcc"
14 Pitch_interval::Pitch_interval (Pitch p1, Pitch p2)
21 Pitch_interval::Pitch_interval ()
23 elem_ref(LEFT) = Pitch (100,0,0);
24 elem_ref(RIGHT) = Pitch (-100,0,0);
29 Pitch_interval::is_empty () const
31 return elem(LEFT) > elem(RIGHT);
36 Pitch_interval::add_point (Pitch p)
38 if (elem_ref(LEFT) > p)
40 if (elem_ref(RIGHT) < p)