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

Function draw_round

src/laybasic/laybasic/laySnap.cc:121–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119// drawing related stuff ...
120
121int draw_round (double x)
122{
123 if (x < -10000.0) {
124 return -10000;
125 } else if (x > 10000.0) {
126 return 10000;
127 } else {
128 return x > 0 ? int (x + 0.5) : int (x - 0.5);
129 }
130}
131
132db::Point draw_round (db::DPoint p, int h)
133{

Callers 1

render_bgMethod · 0.85

Calls 4

draw_round_dblFunction · 0.85
yMethod · 0.80
PointClass · 0.50
xMethod · 0.45

Tested by

no test coverage detected