Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:04,080 --> 00:00:08,080
There are several ways to round or
repeat values, which among other things,
2
00:00:08,080 --> 00:00:12,240
is useful when working with discrete
and periodic textures, such as tiles.
3
00:00:13,040 --> 00:00:17,280
Perhaps the most familiar of these
operations is the Round function itself,
4
00:00:17,280 --> 00:00:19,840
which behaves like a classic rounding operation,
5
00:00:19,840 --> 00:00:25,040
simply outputting the integer closest to the input
value, whether it is above or below the value.
6
00:00:26,560 --> 00:00:31,200
On the other hand, the Floor operation always
rounds down, to the closest integer below,
7
00:00:31,200 --> 00:00:34,240
even if the integer above is
closer to the input value.
8
00:00:35,200 --> 00:00:39,360
And conversely, the Ceiling operation
rounds up to the first integer above.
9
00:00:41,200 --> 00:00:45,440
If we look at these operations on a larger
range of values, it becomes clear that they
10
00:00:45,440 --> 00:00:51,040
are all basically offset versions
of each other. Of these operations,
11
00:00:51,040 --> 00:00:55,920
Floor is probably the most common, as it has some
convenient properties, that we'll see in a moment.
12
00:00:57,520 --> 00:01:02,080
While the three rounding operations we looked
at discard the decimal portion of the values in
13
00:01:02,080 --> 00:01:08,240
one way or another, we also have operations to
do the opposite. The Fraction operation is very
14
00:01:08,240 --> 00:01:14,240
convenient for this. It outputs the distance to
the input value from the first integer below.
15
00:01:14,800 --> 00:01:18,720
That effectively discards the integer
portion, and keeps the decimal,
16
00:01:18,720 --> 00:01:23,120
though that is not exactly the case for negative
numbers, as the Fraction operation always
17
00:01:23,120 --> 00:01:28,080
counts up from the first integer below, while
decimals count from the integer closest to zero.
18
00:01:29,760 --> 00:01:34,480
The nice property of the Floor and Fraction
operations, is that one outputs exactly what
19
00:01:34,480 --> 00:01:39,840
the other discards, the integer and decimal
portions of the value, respectively. So they
20
00:01:39,840 --> 00:01:46,480
complement each other, and adding their outputs
together always gives you back the original input.
2533
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.