设置:
我正在使用Reactive Banana和OpenGL,我有一个我想要旋转的装备.我有以下信号:
bTime :: Behavior t Int -- the time in ms from start of rendering
bAngularVelosity :: Behavior t Double -- the angular velocity
-- which can be increase or
-- decreased by the user
eDisplay :: Event t () -- need to redraw the screen
eKey :: Event t KeyState -- user input
Run Code Online (Sandbox Code Playgroud)
最终,我需要计算bAngle哪个过去到绘图函数:
reactimate $ (draw gears) <$> (bAngle <@ eDisp)
Run Code Online (Sandbox Code Playgroud)
角度很容易计算: a = ?v(t) dt
问题:
我想我想要做的是a = …