Lines Matching refs:ptrA
42 void bts_Int16Vec2D_init( struct bts_Int16Vec2D* ptrA )
44 ptrA->xE = 0;
45 ptrA->yE = 0;
50 void bts_Int16Vec2D_exit( struct bts_Int16Vec2D* ptrA )
52 ptrA->xE = 0;
53 ptrA->yE = 0;
91 const struct bts_Int16Vec2D *ptrA )
99 const struct bts_Int16Vec2D* ptrA,
102 memPtrA += bbs_memWrite16( &ptrA->xE, memPtrA );
103 memPtrA += bbs_memWrite16( &ptrA->yE, memPtrA );
104 return bbs_SIZEOF16( *ptrA );
110 struct bts_Int16Vec2D* ptrA,
114 memPtrA += bbs_memRead16( &ptrA->xE, memPtrA );
115 memPtrA += bbs_memRead16( &ptrA->yE, memPtrA );
116 return bbs_SIZEOF16( *ptrA );
137 uint32 bts_Int16Vec2D_norm2( const struct bts_Int16Vec2D* ptrA )
139 return ( int32 ) ptrA->xE * ptrA->xE + ( int32 ) ptrA->yE * ptrA->yE;
144 uint16 bts_Int16Vec2D_norm( const struct bts_Int16Vec2D* ptrA )
146 return bbs_sqrt32( ( int32 ) ptrA->xE * ptrA->xE + ( int32 ) ptrA->yE * ptrA->yE );
151 void bts_Int16Vec2D_normalize( struct bts_Int16Vec2D* ptrA, int32 bbpA )
153 int32 normL = bbs_sqrt32( ( int32 ) ptrA->xE * ptrA->xE + ( int32 ) ptrA->yE * ptrA->yE );
154 int32 xL = ( ( int32 ) ptrA->xE << 16 ) / normL;
155 int32 yL = ( ( int32 ) ptrA->yE << 16 ) / normL;
156 ptrA->xE = xL >> ( 16 - bbpA );
157 ptrA->yE = yL >> ( 16 - bbpA );
162 struct bts_Int16Vec2D bts_Int16Vec2D_normalized( const struct bts_Int16Vec2D* ptrA, int32 bbpA )
164 struct bts_Int16Vec2D vecL = *ptrA;