eye-rotate ( yaw: float pitch: float v: float-4 -- v': float-4 )


Vocabulary
terrain

Inputs and outputs
yawa float
pitcha float
va float-4
v'a float-4


Definition


TYPED: eye-rotate
( yaw: float pitch: float v: float-4 -- v': float-4 )
[
float-4{ 0.0 -1.0 0.0 0.0 } swap deg>rad
rotation-matrix4
] [
float-4{ -1.0 0.0 0.0 0.0 } swap deg>rad
rotation-matrix4 m4.
] [ m4.v ] tri* float-4{
NAN: fffffe0000000
NAN: fffffe0000000
NAN: fffffe0000000
0.0
} vand ;