beautypg.com

Round – AMT Datasouth PAL User Manual

Page 168

background image

round

162

round

Description

Rounds the specified value to the nearest integer.

Usage

AnyNum

round

RoundedNum

AnyNum

Integer or fixed-point. Value to round to the nearest integer.

RoundedNum

Integer or fixed-point. Nearest integer to AnyNum. The type of the returned
value matches the type of the supplied parameter.

Comments

Although this operator will accept integer values, this operator has no affect upon integers. The
following table shows the affect of the round operator upon various fixed-point values.

1.6

round

2.0

1.5

round

2.0

1.4

round

1.0

1.0

round

1.0

0.0

round

0.0

-1.0

round -1.0

-1.4

round -1.0

-1.5

round -1.0

-1.6

round -2.0