Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F626442
funcs.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
918 B
Referenced Files
None
Subscribers
None
funcs.h
View Options
#ifndef _funcs_h
#define _funcs_h
#include
<stdlib.h>
#include
<vector>
#include
<string>
namespace
Util
{
extern
const
double
pi
;
// int rnd( int q );
inline
int
rnd
(
int
q
){
if
(
q
<=
0
)
return
0
;
return
(
int
)(
rand
()
%
q
);
}
std
::
vector
<
std
::
string
>
getFiles
(
std
::
string
dataPath
,
std
::
string
find
);
double
radians
(
double
degree
);
std
::
string
getDataPath
();
void
setDataPath
(
const
std
::
string
&
str
);
bool
exists
(
const
std
::
string
&
file
);
/* return a random number + some range between min/max */
int
rnd
(
int
q
,
int
min
,
int
max
);
int
max
(
int
a
,
int
b
);
int
min
(
int
a
,
int
b
);
/* return a number between min/max */
int
rnd
(
int
min
,
int
max
);
void
blend_palette
(
int
*
pal
,
int
mp
,
int
sc
,
int
ec
);
void
rest
(
int
x
);
std
::
string
trim
(
const
std
::
string
&
str
);
std
::
string
upcase
(
std
::
string
str
);
int
levenshtein
(
const
std
::
string
&
str1
,
const
std
::
string
&
str2
);
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 12:44 AM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
152007
Default Alt Text
funcs.h (918 B)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline