Skip to content

Commit 1456bea

Browse files
committed
Avoid chaining to.
1 parent 9495219 commit 1456bea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Starlight/Integration.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ runAction dt system c = \case
246246
desiredAngle c t = \case
247247
Forwards -> Just (angleOf (c^.velocity_))
248248
Backwards -> t^?_Just.velocity_.to (angleOf.subtract (c^.velocity_)) <|> Just (angleOf (-c^.velocity_))
249-
Target -> t^?_Just.to (projected dt).to (`L.direction` (c^.position_)).to angleOf
249+
Target -> t^?_Just.to (angleOf . (`L.direction` (c^.position_)) . projected dt)
250250

251251
thrust :: Newtons Double
252252
thrust = convert $ Kilo (Grams 1000) .*. Kilo (Metres 10) ./. Seconds (1/60) ./. Seconds 1

0 commit comments

Comments
 (0)