Fixes Issue 1504, allowing feather beam line breaking.
[lilypond/patrick.git] / lily / dimensions-scheme.cc
blob3524faf49b7cf6af8be077eeaaa4281687a8796e
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #include "lily-guile.hh"
21 #include "dimensions.hh"
22 #include "warn.hh"
24 LY_DEFINE (ly_pt, "ly:pt",
25 1, 0, 0, (SCM num),
26 "@var{num} printer points.")
28 LY_ASSERT_TYPE (scm_is_number, num, 1);
29 return scm_from_double (point_constant
30 * scm_to_double (num));
33 LY_DEFINE (ly_cm, "ly:cm",
34 1, 0, 0, (SCM num),
35 "@var{num} cm.")
37 LY_ASSERT_TYPE (scm_is_number, num, 1);
38 return scm_from_double (cm_constant
39 * scm_to_double (num));
42 LY_DEFINE (ly_inch, "ly:inch",
43 1, 0, 0, (SCM num),
44 "@var{num} inches.")
46 LY_ASSERT_TYPE (scm_is_number, num, 1);
47 return scm_from_double (inch_constant
48 * scm_to_double (num));
51 LY_DEFINE (ly_mm, "ly:mm",
52 1, 0, 0, (SCM num),
53 "@var{num} mm.")
55 LY_ASSERT_TYPE (scm_is_number, num, 1);
56 return scm_from_double (mm_constant
57 * scm_to_double (num));
60 LY_DEFINE (ly_bp, "ly:bp",
61 1, 0, 0, (SCM num),
62 "@var{num} bigpoints (1/72th inch).")
64 LY_ASSERT_TYPE (scm_is_number, num, 1);
65 return scm_from_double (bigpoint_constant
66 * scm_to_double (num));