package
Version:
v0.0.0-...-e180675
Opens a new window with list of versions in this module.
Published: Dec 11, 2020
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
ElasticCollision updates velocity of two objects
Objects are assumed to have equal mass
type Object struct {
X vector.Vector
V vector.Vector
}
Object consist of position, velocity
New is a constructur of type Object
Position updates position of an object based on current velocity
Velocity updates velocity of an object based on provided acceleration
Source Files
¶
Click to show internal directories.
Click to hide internal directories.