Name: PGRND
Purpose: find the smallest `round' number greater than x
Category: GRAPHICS
File: pgplot.src
Author: T.J. Pearson
Use: see description below.
Description:
REAL FUNCTION PGRND (X, NSUB)
REAL X
INTEGER NSUB
Routine to find the smallest "round" number larger than x, a
"round" number being 1, 2 or 5 times a power of 10. If X is negative,
PGRND(X) = -PGRND(ABS(X)). eg PGRND(8.7) = 10.0,
PGRND(-0.4) = -0.5. If X is zero, the value returned is zero.
This routine is used by PGBOX for choosing tick intervals.
Returns:
PGRND : the "round" number.
Arguments:
X (input) : the number to be rounded.
NSUB (output) : a suitable number of subdivisions for
subdividing the "nice" number: 2 or 5.
Updates: Oct 16, 1998: JPT automatically extracted from source.