Add arrowed sharp signs
[lilypond.git] / lily / dimensions-scheme.cc
blob0f4b4a6b3b91c5fb184088661c412b04d1dc6400
1 /*
2 dimensions-scheme.cc -- implement Dimension handling
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "lily-guile.hh"
10 #include "dimensions.hh"
11 #include "warn.hh"
13 LY_DEFINE (ly_pt, "ly:pt",
14 1, 0, 0, (SCM num),
15 "@var{num} printer points.")
17 LY_ASSERT_TYPE (scm_is_number, num, 1);
18 return scm_from_double (point_constant
19 * scm_to_double (num));
22 LY_DEFINE (ly_cm, "ly:cm",
23 1, 0, 0, (SCM num),
24 "@var{num} cm.")
26 LY_ASSERT_TYPE (scm_is_number, num, 1);
27 return scm_from_double (cm_constant
28 * scm_to_double (num));
31 LY_DEFINE (ly_inch, "ly:inch",
32 1, 0, 0, (SCM num),
33 "@var{num} inches.")
35 LY_ASSERT_TYPE (scm_is_number, num, 1);
36 return scm_from_double (inch_constant
37 * scm_to_double (num));
40 LY_DEFINE (ly_mm, "ly:mm",
41 1, 0, 0, (SCM num),
42 "@var{num} mm.")
44 LY_ASSERT_TYPE (scm_is_number, num, 1);
45 return scm_from_double (mm_constant
46 * scm_to_double (num));
49 LY_DEFINE (ly_bp, "ly:bp",
50 1, 0, 0, (SCM num),
51 "@var{num} bigpoints (1/72th inch).")
53 LY_ASSERT_TYPE (scm_is_number, num, 1);
54 return scm_from_double (bigpoint_constant
55 * scm_to_double (num));