Documentation
¶
Index ¶
- func Build(urlOptions map[string]interface{}) (name string)
- func FloatPosToGridPos(x float64, y float64) (gridX int, gridY int)
- func LinearVelocity(vel Velocity) (xVel float64, yVel float64)
- func NextPos(x float64, y float64, vel Velocity) (nextX float64, nextY float64)
- func Radians(angle float64) (radianAngle float64)
- type Grid
- type Organism
- type Space
- type Velocity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FloatPosToGridPos ¶
FloatPosToGridPos rounds a float position to a discrete position
func LinearVelocity ¶
LinearVelocity calculates linear velocity from speed * direction
Types ¶
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
Grid represents the simulation area
type Organism ¶
type Organism struct {
// contains filtered or unexported fields
}
Organism represents one creature that occupies one space
Click to show internal directories.
Click to hide internal directories.