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

Method Sample

olcPixelGameEngine.h:2084–2089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2082 }
2083
2084 Pixel Sprite::Sample(float x, float y) const
2085 {
2086 int32_t sx = std::min((int32_t)((x * (float)width)), width - 1);
2087 int32_t sy = std::min((int32_t)((y * (float)height)), height - 1);
2088 return GetPixel(sx, sy);
2089 }
2090
2091 Pixel Sprite::Sample(const olc::vf2d& uv) const
2092 {

Callers 5

FillTexturedTriangleMethod · 0.45
TexturedTriangleMethod · 0.45
RasterTriangleMethod · 0.45
DrawSpriteMethod · 0.45
DrawPartialSpriteMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected