FLOOR
This tutorial is specific to our newest product, Hudl Sportscode. If you’re on Sportscode v11, use these resources instead or upgrade today.
This script will return a number which has been rounded down to the specified number of digits from the decimal point.
This is similar to the decimal command, except that it returns a number and not a string. If you need to display a certain number of digits after the decimal point use the decimal command.
FORMAT: FLOOR (number, number of digits)
DEFINITIONS:
- Number: numerical expression for the number of digits.
If positive, the number of digits will show to the right of the decimal point. If negative, the number of digits will show to the left of the decimal point starting at tens. If 0, no decimal placing will be shown.
EXAMPLE 1:
show FLOOR (34.235, 2)
Shows 34.23.
EXAMPLE 2:
show FLOOR (3423.456, -2)
Shows 3,400.