Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
0df37933
Commit
0df37933
authored
Apr 11, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle negative constants
parent
a2037257
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
convert_to_biu.h
include/convert_to_biu.h
+4
-3
No files found.
include/convert_to_biu.h
View file @
0df37933
...
...
@@ -18,7 +18,8 @@
inline
int
Mils2iu
(
int
mils
)
{
#if defined( USE_PCBNEW_NANOMETRES )
return
int
(
mils
*
25.4e3
+
0
.
5
);
double
x
=
mils
*
25.4e3
;
return
int
(
x
<
0
?
x
-
0
.
5
:
x
+
0
.
5
);
#else
return
mils
*
10
;
#endif
...
...
@@ -28,11 +29,11 @@ inline int Mils2iu( int mils )
inline
int
DMils2iu
(
int
dmils
)
{
#if defined( USE_PCBNEW_NANOMETRES )
return
int
(
dmils
*
25.4e2
+
0
.
5
);
double
x
=
dmils
*
25.4e2
;
return
int
(
x
<
0
?
x
-
0
.
5
:
x
+
0
.
5
);
#else
return
dmils
;
#endif
}
#endif // #define CONVERT_TO_BIU_H
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