MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / Backward

Method Backward

extensions/olcPGEX_Graphics2D.h:280–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278 }
279
280 void olc::GFX2D::Transform2D::Backward(float in_x, float in_y, float &out_x, float &out_y)
281 {
282 out_x = in_x * matrix[3][0][0] + in_y * matrix[3][1][0] + matrix[3][2][0];
283 out_y = in_x * matrix[3][0][1] + in_y * matrix[3][1][1] + matrix[3][2][1];
284 float out_z = in_x * matrix[3][0][2] + in_y * matrix[3][1][2] + matrix[3][2][2];
285 if (out_z != 0)
286 {
287 out_x /= out_z;
288 out_y /= out_z;
289 }
290 }
291
292 void olc::GFX2D::Transform2D::Invert()
293 {

Callers 1

DrawSpriteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected