MCPcopy Create free account
hub / github.com/davisking/dlib / operator*

Function operator*

dlib/geometry/drectangle.h:316–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314 }
315
316 inline drectangle operator* (
317 const drectangle& rect,
318 const double& scale
319 )
320 {
321 if (!rect.is_empty())
322 {
323 const double width = (rect.right()-rect.left())*scale;
324 const double height = (rect.bottom()-rect.top())*scale;
325 const dlib::vector<double,2> p = center(rect);
326 return drectangle(p.x()-width/2, p.y()-height/2, p.x()+width/2, p.y()+height/2);
327 }
328 else
329 {
330 return rect;
331 }
332 }
333
334 inline drectangle operator* (
335 const double& scale,

Callers

nothing calls this directly

Calls 7

centerFunction · 0.70
drectangleClass · 0.70
is_emptyMethod · 0.45
rightMethod · 0.45
leftMethod · 0.45
bottomMethod · 0.45
topMethod · 0.45

Tested by

no test coverage detected