From f50894efadac8455e4ff388c6a4b017738ca10b9 Mon Sep 17 00:00:00 2001
From: Bert Timmerman <bert.timmerman@xs4all.nl>
Date: Thu, 3 Mar 2011 22:12:32 +0100
Subject: [PATCH 1/1] Add pcb units specific macro and conversion function.

---
 coord.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/coord.h b/coord.h
index dd9f235..12a2f47 100644
--- a/coord.h
+++ b/coord.h
@@ -21,6 +21,7 @@
 #define	MIL_UNITS	(25.4*MICRON_UNITS)
 #define	MM_UNITS	(1000.0*MICRON_UNITS)
 #define	KICAD_UNIT	(MIL_UNITS/10.0)
+#define	PCB_UNIT	(MIL_UNITS/100.0)
 
 #define	MIL_IN_MM	0.0254
 
@@ -66,6 +67,12 @@ static inline int units_to_kicad(unit_type u)
 }
 
 
+static inline int units_to_pcb(unit_type u)
+{
+	return (double) u/PCB_UNIT;
+}
+
+
 static inline int coord_eq(struct coord a, struct coord b)
 {
 	return a.x == b.x && a.y == b.y;
-- 
1.7.3.4

