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
Removed O.* files for old object descriptors
[sdlbotor.git]
/
globalfunc.cpp
blob
c0b78969b44382fd38b67c810441526fc816c6e1
1
#include <cmath>
2
#include
"globalfunc.h"
3
4
namespace
botor
5
{
6
7
double
dst
(
float
x1
,
float
y1
,
float
x2
,
float
y2
)
8
{
9
return
sqrt
(
pow
(
y2
-
y1
,
2
) +
pow
(
x2
-
x1
,
2
) );
10
}
11
12
bool
isBitSet
(
unsigned int
mask
,
unsigned int
bit
)
13
{
14
return
(
mask
&
bit
) ==
bit
;
15
}
16
17
}