*ptrJ = s - w * (*ptrI);\r
}\r
\r
+ float2 IndiceTools::toPixelFloat(int s, int w)\r
+ {\r
+ const float y = (float)s / (float)w;\r
+ const float x = (float)s - (float)w * y;\r
+ return { x, y };\r
+ }\r
+\r
/**\r
* i[0,H[ j[0,W[ --> s[0,W*H[\r
*/\r
- int IndiceTools::toS(int W, int i, int j)\r
+ int IndiceTools::toS(int w, int i, int j)\r
{\r
- return (i * W) + j;\r
+ return (i * w) + j;\r
}\r
\r
}\r