LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 1997--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 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 | 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 | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
11 LilyPond is distributed in the hope that it will be useful, | 11 LilyPond is distributed in the hope that it will be useful, |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 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/>. | 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
18 */ | 18 */ |
19 | 19 |
20 #include "offset.hh" | 20 #include "offset.hh" |
21 | 21 |
22 #ifndef STANDALONE | 22 #ifndef STANDALONE |
23 string | 23 string |
24 Offset::to_string () const | 24 Offset::to_string () const |
25 { | 25 { |
26 string s; | 26 string s; |
27 s = string (" (") + ::to_string (coordinate_a_[X_AXIS]) + ", " | 27 s = string (" (") + std::to_string (coordinate_a_[X_AXIS]) + ", " |
28 + ::to_string (coordinate_a_[Y_AXIS]) + ")"; | 28 + std::to_string (coordinate_a_[Y_AXIS]) + ")"; |
29 return s; | 29 return s; |
30 } | 30 } |
31 #endif | 31 #endif |
32 | 32 |
33 /* | 33 /* |
34 free bsd fix by John Galbraith | 34 free bsd fix by John Galbraith |
35 */ | 35 */ |
36 | 36 |
37 Offset | 37 Offset |
38 complex_multiply (Offset z1, Offset z2) | 38 complex_multiply (Offset z1, Offset z2) |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 else | 178 else |
179 return Offset (sin ((90 - angle) * M_PI/180.0), | 179 return Offset (sin ((90 - angle) * M_PI/180.0), |
180 sin (angle * M_PI/180.0)); | 180 sin (angle * M_PI/180.0)); |
181 else if (angle < -90) | 181 else if (angle < -90) |
182 return Offset (sin ((90 + angle) * M_PI/180.0), | 182 return Offset (sin ((90 + angle) * M_PI/180.0), |
183 sin ((-180 - angle) * M_PI/180.0)); | 183 sin ((-180 - angle) * M_PI/180.0)); |
184 else | 184 else |
185 return Offset (sin ((90 + angle) * M_PI/180.0), | 185 return Offset (sin ((90 + angle) * M_PI/180.0), |
186 sin (angle * M_PI/180.0)); | 186 sin (angle * M_PI/180.0)); |
187 } | 187 } |
LEFT | RIGHT |