Back to index

tetex-bin  3.0
Functions
scalewidth.c File Reference
#include "dvips.h"

Go to the source code of this file.

Functions

integer scalewidth P2C (register integer, a, register integer, b)

Function Documentation

integer scalewidth P2C ( register  integer,
a  ,
register  integer,
b   
)

Definition at line 19 of file scalewidth.c.

{
  register integer al, bl ;

  if (a < 0)
     return -scalewidth(-a, b) ;
  if (b < 0)
     return -scalewidth(a, -b) ;
  al = a & 32767 ;
  bl = b & 32767 ;
  a >>= 15 ;
  b >>= 15 ;
  return ( ((al*bl/32768) + a*bl+al*b)/32 + a*b*1024) ;
}