src/texture.cpp in rays-0.1.3 vs src/texture.cpp in rays-0.1.4

- old
+ new

@@ -328,18 +328,30 @@ { return self->height; } float + Texture::s (float x) const + { + return x / (float) self->bitmap.width(); + } + + float + Texture::t (float y) const + { + return y / (float) self->bitmap.height(); + } + + float Texture::s_max () const { - return (float) self->width / (float) self->bitmap.width(); + return s(self->width); } float Texture::t_max () const { - return (float) self->height / (float) self->bitmap.height(); + return t(self->height); } const Bitmap& Texture::bitmap () const {