protected Result < float [ ] > getEdgeMidPoint ( long from , long to ) { Result < PortalResult > ppoints = getPortalPoints ( from , to ) ; if ( ppoints . failed ( ) ) { return Result . of ( ppoints . status , ppoints . message ) ; } float [ ] left = ppoints . result . left ; float [ ] right = ppoints . result . right ; float [ ] mid = new float [ 3 ] ; mid [ 0 ] = ( left [ 0 ] + right [ 0 ] ) * 0.5f ; mid [ 1 ] = ( left [ 1 ] + right [ 1 ] ) * 0.5f ; mid [ 2 ] = ( left [ 2 ] + right [ 2 ] ) * 0.5f ; return Result . success ( mid ) ; }
Returns edge mid point between two polygons .