line-triangle intersection

trying different functions