Skip to main content

Conversion Procedure

                          I-n

We are now left with the 2 factor. This can be accomplished with an arithmetic shift left by (I-n) or an arithmetic shift right by (n-I) as is appropriate. The offset factor, S, may now be added using an integer add.

The procedure for converting NGP coordinates to integer device coordinates is then:

               1.   move coordinate to a register and extend sign
2. integer multiply by Q (if necessary)
3. arithmetic shift left by (I-n)
4. integer add S

This procedure would generally be much faster than:

               1.   move coordinate to register and extend sign
2. float fractional coordinate
3. floating point multiply
4. floating point add
5. conversion to fixed point
       [ This RFC was put into machine readable form for entry ]
[ into the online RFC archives by BBN Corp. under the ]
[ direction of Alex McKenzie. 1/97 ]