
function [ ori , p ] = checkEdgeOri ( eid , hn )

if ( eid < hn )
    ori = 0 ;  %% hor
else
    ori = 1 ; %% ver    
end

if ( ori == 0 ) 
    p = eid ;
else
    p = eid - hn ;
end
