GValue GmBase::getDistancePL(const lPoint& pt, const char* line)
{
int i, curr=0;
InfoType ptcnt;
GValue d, dist = KDBL_MAX;
lPoint *p;
ptcnt = *(InfoType*)line;
p = (lPoint*)&line[InfoSize];
for( i=1; i<ptcnt; i++ )
{
d = getDistance( pt, p[i-1], p[i] );
if( d < dist ) dist = d;
}
return dist;
}
here InfoType is defined as double and KDEL_MEX as defined as some flaot point value like 1.75633565664645e+3256 can anybody tell em about this
lPoint *p;
ptcnt = *(InfoType*)line;
p = (lPoint*)&line[InfoSize];
for( i=1; i<ptcnt; i++ )
{
d = getDistance( pt, p[i-1], p[i] );
if( d < dist ) dist = d;
}
return dist;
- p is apoint of IPoint but
ptcnt = *(InfoType*)line;
is not apointer.. please explain me this function