@@ -43,7 +43,7 @@ class ICOORD {
4343  // / constructor
4444  // /@param xin x value
4545  // /@param yin y value
46-   ICOORD (int16_t  xin, int16_t  yin) {
46+   ICOORD (TDimension  xin, TDimension  yin) {
4747    xcoord = xin;
4848    ycoord = yin;
4949  }
@@ -54,20 +54,20 @@ class ICOORD {
5454  bool  Serialize (TFile *f) const ;
5555
5656  // / access function
57-   int16_t  x () const  {
57+   TDimension  x () const  {
5858    return  xcoord;
5959  }
6060  // / access_function
61-   int16_t  y () const  {
61+   TDimension  y () const  {
6262    return  ycoord;
6363  }
6464
6565  // / rewrite function
66-   void  set_x (int16_t  xin) {
66+   void  set_x (TDimension  xin) {
6767    xcoord = xin; //  write new value
6868  }
6969  // / rewrite function
70-   void  set_y (int16_t  yin) { //  value to set
70+   void  set_y (TDimension  yin) { //  value to set
7171    ycoord = yin;
7272  }
7373
@@ -128,15 +128,15 @@ class ICOORD {
128128  // / cross product
129129  friend  int32_t  operator *(const  ICOORD &, const  ICOORD &);
130130  // / multiply
131-   friend  ICOORD operator *(const  ICOORD &, int16_t );
131+   friend  ICOORD operator *(const  ICOORD &, TDimension );
132132  // / multiply
133-   friend  ICOORD operator *(int16_t , const  ICOORD &);
133+   friend  ICOORD operator *(TDimension , const  ICOORD &);
134134  // / multiply
135-   friend  ICOORD &operator *=(ICOORD &, int16_t );
135+   friend  ICOORD &operator *=(ICOORD &, TDimension );
136136  // / divide
137-   friend  ICOORD operator /(const  ICOORD &, int16_t );
137+   friend  ICOORD operator /(const  ICOORD &, TDimension );
138138  // / divide
139-   friend  ICOORD &operator /=(ICOORD &, int16_t );
139+   friend  ICOORD &operator /=(ICOORD &, TDimension );
140140  // / rotate
141141  // /@param vec by vector
142142  void  rotate (const  FCOORD &vec);
@@ -155,8 +155,8 @@ class ICOORD {
155155  bool  DeSerialize (bool  swap, FILE *fp);
156156
157157protected: 
158-   int16_t  xcoord; // /< x value
159-   int16_t  ycoord; // /< y value
158+   TDimension  xcoord; // /< x value
159+   TDimension  ycoord; // /< y value
160160};
161161
162162class  ICOORDELT  : public  ELIST_LINK ,
@@ -171,7 +171,7 @@ class ICOORDELT : public ELIST_LINK,
171171  // / constructor
172172  // /@param xin x value
173173  // /@param yin y value
174-   ICOORDELT (int16_t  xin, int16_t  yin) {
174+   ICOORDELT (TDimension  xin, TDimension  yin) {
175175    xcoord = xin;
176176    ycoord = yin;
177177  }
@@ -438,7 +438,7 @@ inline int32_t operator*( // cross product
438438
439439inline  ICOORD operator *( //  scalar multiply
440440    const  ICOORD &op1,   //  operands
441-     int16_t  scale) {
441+     TDimension  scale) {
442442  ICOORD result; //  output
443443
444444  result.xcoord  = op1.xcoord  * scale;
@@ -447,7 +447,7 @@ inline ICOORD operator*( // scalar multiply
447447}
448448
449449inline  ICOORD operator *( //  scalar multiply
450-     int16_t  scale,
450+     TDimension  scale,
451451    const  ICOORD &op1 //  operands
452452) {
453453  ICOORD result; //  output
@@ -465,7 +465,7 @@ inline ICOORD operator*( // scalar multiply
465465
466466inline  ICOORD &operator *=( //  scalar multiply
467467    ICOORD &op1,           //  operands
468-     int16_t  scale) {
468+     TDimension  scale) {
469469  op1.xcoord  *= scale;
470470  op1.ycoord  *= scale;
471471  return  op1;
@@ -479,7 +479,7 @@ inline ICOORD &operator*=( // scalar multiply
479479
480480inline  ICOORD operator /( //  scalar divide
481481    const  ICOORD &op1,   //  operands
482-     int16_t  scale) {
482+     TDimension  scale) {
483483  ICOORD result; //  output
484484
485485  result.xcoord  = op1.xcoord  / scale;
@@ -495,7 +495,7 @@ inline ICOORD operator/( // scalar divide
495495
496496inline  ICOORD &operator /=( //  scalar divide
497497    ICOORD &op1,           //  operands
498-     int16_t  scale) {
498+     TDimension  scale) {
499499  op1.xcoord  /= scale;
500500  op1.ycoord  /= scale;
501501  return  op1;
@@ -509,8 +509,8 @@ inline ICOORD &operator/=( // scalar divide
509509
510510inline  void  ICOORD::rotate ( //  rotate by vector
511511    const  FCOORD &vec) {
512-   auto  tmp = static_cast <int16_t >(std::floor (xcoord * vec.x () - ycoord * vec.y () + 0 .5f ));
513-   ycoord = static_cast <int16_t >(std::floor (ycoord * vec.x () + xcoord * vec.y () + 0 .5f ));
512+   auto  tmp = static_cast <TDimension >(std::floor (xcoord * vec.x () - ycoord * vec.y () + 0 .5f ));
513+   ycoord = static_cast <TDimension >(std::floor (ycoord * vec.x () + xcoord * vec.y () + 0 .5f ));
514514  xcoord = tmp;
515515}
516516
0 commit comments