Improve wall glare
This commit is contained in:
@@ -18,6 +18,11 @@ import Data.Maybe
|
||||
|
||||
import Control.Applicative
|
||||
|
||||
alongLineBy :: Float -> Point2 -> Point2 -> Point2
|
||||
alongLineBy x a b = a +.+ y *.* normalizeV (b -.- a)
|
||||
where
|
||||
y = min x $ dist a b
|
||||
|
||||
|
||||
closestPointOnLine :: Point2 -> Point2 -> Point2 -> Point2
|
||||
{-# INLINE closestPointOnLine #-}
|
||||
|
||||
Reference in New Issue
Block a user