Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
d97e5d68
Commit
d97e5d68
authored
Mar 27, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Max/Min/Abs as static inline functions.
parent
2fe534b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/misc/util/abc_global.h
+11
-0
No files found.
src/misc/util/abc_global.h
View file @
d97e5d68
...
...
@@ -236,6 +236,17 @@ ABC_NAMESPACE_HEADER_START
((type *) Util_MemRecAlloc(malloc(sizeof(type) * (num)))))
#endif
static
inline
int
Abc_AbsInt
(
int
a
)
{
return
a
<
0
?
-
a
:
a
;
}
static
inline
int
Abc_MaxInt
(
int
a
,
int
b
)
{
return
a
>
b
?
a
:
b
;
}
static
inline
int
Abc_MinInt
(
int
a
,
int
b
)
{
return
a
<
b
?
a
:
b
;
}
static
inline
word
Abc_MaxWord
(
word
a
,
word
b
)
{
return
a
>
b
?
a
:
b
;
}
static
inline
word
Abc_MinWord
(
word
a
,
word
b
)
{
return
a
<
b
?
a
:
b
;
}
static
inline
float
Abc_AbsFloat
(
float
a
)
{
return
a
<
0
?
-
a
:
a
;
}
static
inline
float
Abc_MaxFloat
(
float
a
,
float
b
)
{
return
a
>
b
?
a
:
b
;
}
static
inline
float
Abc_MinFloat
(
float
a
,
float
b
)
{
return
a
<
b
?
a
:
b
;
}
static
inline
double
Abc_AbsDouble
(
double
a
)
{
return
a
<
0
?
-
a
:
a
;
}
static
inline
double
Abc_MaxDouble
(
double
a
,
double
b
)
{
return
a
>
b
?
a
:
b
;
}
static
inline
double
Abc_MinDouble
(
double
a
,
double
b
)
{
return
a
<
b
?
a
:
b
;
}
enum
Abc_VerbLevel
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment