KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eda_units.cpp File Reference
#include <eda_units.h>
#include <fmt/core.h>
#include <math/util.h>
#include <macros.h>
#include <charconv>
#include <wx/translation.h>

Go to the source code of this file.

Macros

#define IU_TO_MM(x, scale)   ( x / scale.IU_PER_MM )
 
#define IU_TO_IN(x, scale)   ( x / scale.IU_PER_MILS / 1000 )
 
#define IU_TO_MILS(x, scale)   ( x / scale.IU_PER_MILS )
 
#define MM_TO_IU(x, scale)   ( x * scale.IU_PER_MM )
 
#define IN_TO_IU(x, scale)   ( x * scale.IU_PER_MILS * 1000 )
 
#define MILS_TO_IU(x, scale)   ( x * scale.IU_PER_MILS )
 

Macro Definition Documentation

◆ IN_TO_IU

#define IN_TO_IU (   x,
  scale 
)    ( x * scale.IU_PER_MILS * 1000 )

Definition at line 240 of file eda_units.cpp.

◆ IU_TO_IN

#define IU_TO_IN (   x,
  scale 
)    ( x / scale.IU_PER_MILS / 1000 )

Definition at line 237 of file eda_units.cpp.

◆ IU_TO_MILS

#define IU_TO_MILS (   x,
  scale 
)    ( x / scale.IU_PER_MILS )

Definition at line 238 of file eda_units.cpp.

◆ IU_TO_MM

#define IU_TO_MM (   x,
  scale 
)    ( x / scale.IU_PER_MM )

Definition at line 236 of file eda_units.cpp.

◆ MILS_TO_IU

#define MILS_TO_IU (   x,
  scale 
)    ( x * scale.IU_PER_MILS )

Definition at line 241 of file eda_units.cpp.

◆ MM_TO_IU

#define MM_TO_IU (   x,
  scale 
)    ( x * scale.IU_PER_MM )

Definition at line 239 of file eda_units.cpp.