# texture area if necessary.
#
use strict;
-use POSIX qw(floor);
my $SELF = $0;
$SELF =~ s,.*\/,,;
if ($n < 3 or $n > 4) {
report("?") if $VERBOSE;
unless ($NOOP) {
- print scalar(<>) foreach (0 .. $n);
+ print scalar(<>) foreach (1 .. $n);
}
next;
}
$y = 0.0 if $y < 0.0;
$y = 1.0 - $PIXH if $y > 1.0 - $PIXH;
- $x -= $x - POSIX::floor($x / $PIXW) * $PIXW;
- $y -= $y - POSIX::floor($y / $PIXH) * $PIXH;
+ $x = int($x / $PIXW) * $PIXW;
+ $y = int($y / $PIXH) * $PIXH;
$ref0[1] = $x, $ref0[2] = $y;
$ref1[1] = $x + $PIXW;