ImagerOpsImpl.mesa
Copyright © 1984 Xerox Corporation. All rights reserved.
Michael Plass, March 19, 1984 5:16:59 pm PST
Doug Wyatt, October 8, 1984 4:53:10 pm PDT
DIRECTORY
ImagerOps USING [],
Real USING [RealException, RoundLI],
Vector2 USING [VEC];
ImagerOpsImpl: CEDAR PROGRAM
IMPORTS Real
EXPORTS ImagerOps
VEC: TYPE ~ Vector2.VEC;
DRound:
PUBLIC
PROC[v:
VEC]
RETURNS[
VEC] ~ {
Round: PROC[r: REAL] RETURNS[REAL] ~ { RETURN[Real.RoundLI[r]] };
v.x ← Round[v.x ! Real.RealException => CONTINUE];
v.y ← Round[v.y ! Real.RealException => CONTINUE];
RETURN[v];
};
END.