cogl-texture-2d: Fix the coordinate wrapping for negative coordinates

The formula to wrap the coordinates to the [0,1] range was broken when
the coordinates were negative.
This commit is contained in:
Neil Roberts 2010-01-11 16:21:56 +00:00
parent f5d809f1e8
commit f1c289378e

View File

@ -66,8 +66,8 @@ _cogl_texture_2d_wrap_coords (float t_1, float t_2,
t_2 -= int_part; t_2 -= int_part;
if (signbit (int_part)) if (signbit (int_part))
{ {
*out_t_1 = 1.0f - t_1; *out_t_1 = 1.0f + t_1;
*out_t_2 = 1.0f - t_2; *out_t_2 = 1.0f + t_2;
} }
else else
{ {