MROUND Function

MROUND(a, multiple)

Rounds a to the desired multiple.

Parameters

a (REAL)

The input value.

multiple (REAL)

awill be rounded to the closest multiple of this value.

Return Value

Returns a REAL.

Remarks

Rounds a to the desired multiple, away from zero if dividing gives a remainder greater than or equal to half the value of the multiple.

multiplemust be non-zero. Ifmultipleis zero, the task will fault. An error will be logged in the Event Log and the user program running on the task will stop.

Examples

MROUND(87,12) returns 84

MROUND(0.53,0.15) returns 0.6

 

See Also

ROUND | Standard Functions


Send comments on this topic.

Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion