repo.or.cz
/
lilypond.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
flower-1.0.2
[lilypond.git]
/
real.hh
blob
1f2187c8c1a528da7ea8d93988bdbde4bb3f6a8c
1
#ifndef REAL_HH
2
#define REAL_HH
3
typedef
double
Real
;
4
inline
Real
sqr
(
Real x
){
5
return
x
*
x
;
6
}
7
inline
Real
MIN
(
Real x
,
Real y
) {
8
return
(
x
<
y
)?
x
:
y
;
9
}
10
11
inline
Real
MAX
(
Real x
,
Real y
) {
12
return
(
x
>
y
) ?
x
:
y
;
13
}
14
15
inline
Real
ABS
(
Real x
)
16
{
17
return
(
x
>
0
)?
x
:-
x
;
18
}
19
inline
20
int
sgn
(
Real x
) {
21
if
(!
x
)
return
0
;
22
return
(
x
>
0
) ?
1
: -
1
;
23
}
24
25
#endif