I have a lisp code here that computes the plotting scale for a certain lot (surveying). My problem is that I don't know how to round up the values to the nearest hundreds or thousands to obtain the scale. For example, If my lisp computes the scale to be 45, It will show 100, when it computes 327, it must show 400, when it computes 923, it must show 1000, when 1134 it must show 1200. Can anyone help me with this? Here's the code by the way. THANK YOU GUYS!
(defun c:ss ( / xn xs xx diff)
(setq xn (getpoint "\Pick the point on the extreme north of the lot boundary:"))
(setq xs (getpoint "\
Pick the point on the extreme south of the lot boundary:"))
(setq xx (getpoint "\Pick insertion point"))
(setq diff (/ (- (cadr xn) (cadr xs)) 0.3))
(command "text" "" "" diff)
(princ)
)