Fix distanceSqToSegment function
Use trumbore moller algorithm for tri inter
Code clean up + a little bit of optimization
Update build