MCPcopy Create free account
hub / github.com/KLayout/klayout / ld_offset

Function ld_offset

src/db/db/dbStreamLayers.h:95–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95inline ld_type ld_offset (ld_type ld)
96{
97 if (ld < 0) {
98 ld_type neg = ld - std::numeric_limits<ld_type>::min();
99 ld_type pos = -(ld + 1);
100 return neg < pos ? -neg : pos;
101 } else {
102 return ld;
103 }
104}
105
106/**
107 * @brief With a relative b, b is added to a. Otherwise b replaces a.

Callers 3

ld_combineFunction · 0.85
format_ldFunction · 0.85

Calls 1

minFunction · 0.85

Tested by

no test coverage detected