repo.or.cz
/
sdlbotor.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Acid.
[sdlbotor.git]
/
globalfunc.h
blob
d50bdb5b37cec2cf8853c368578635ee0efb7c09
1
#ifndef GLOBALFUNC_H
2
#define GLOBALFUNC_H
3
4
namespace
botor
5
{
6
template
<
typename T
>
inline
int
sign
(
T a
)
7
{
8
return
(
a
==
0
) ?
0
: ( (
a
<
0
) ? -
1
:
1
);
9
}
10
11
double
dst
(
float
x1
,
float
y1
,
float
x2
,
float
y2
);
12
13
bool
isBitSet
(
unsigned int
mask
,
unsigned int
bit
);
14
}
15
16
#endif