MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / PatchControlArray_invert

Function PatchControlArray_invert

radiantcore/patch/PatchControl.h:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19inline void PatchControlArray_invert(PatchControlArray& ctrl, std::size_t width, std::size_t height)
20{
21 PatchControlArray tmp(width);
22
23 PatchControlIter from = ctrl.begin() + (width * (height - 1));
24 PatchControlIter to = ctrl.begin();
25
26 for(std::size_t h = 0; h != ((height - 1) >> 1); ++h, to += width, from -= width)
27 {
28 copy_ctrl(tmp.begin(), to, to + width);
29 copy_ctrl(to, from, from + width);
30 copy_ctrl(from, tmp.begin(), tmp.begin() + width);
31 }
32}
33
34#endif /*PATCHCONTROL_H_*/

Callers 2

transformMethod · 0.85
invertMatrixMethod · 0.85

Calls 2

copy_ctrlFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected