Handbook
Glossary
update-velocity ( other-body body dt -- )
Vocabulary
benchmark
.
nbody-simd
Inputs
other-body
an
object
body
an
object
dt
an
object
Outputs
None
Definition
USING:
accessors
kernel
math
math.vectors
;
IN:
benchmark.nbody-simd
::
update-velocity
( other-body body dt -- )
dt body other-body
mag
[
[
body
]
2dip
[
[
[
other-body
mass>>
]
]
dip
[
*
]
curry
compose
]
dip
[
n*v
v-
]
curry
compose
change-velocity
drop
]
[
[
other-body
]
2dip
[
[
[
body
mass>>
]
]
dip
[
*
]
curry
compose
]
dip
[
n*v
v+
]
curry
compose
change-velocity
drop
]
2bi
;
inline