dyn4go

package module
v0.0.0-...-344f55e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2014 License: MIT Imports: 5 Imported by: 0

README

dyn4go

The dyn4j physics library ported into Golang.

Licensing

This port is licensed under the MIT license provided with this source code. The dyn4j library, from which this port has been created, is licensed differently. See http://www.dyn4j.org/ for details on that project.

Documentation

Index

Constants

View Source
const FOOT_POUND_TO_NEWTON_METER float64 = 0.7375621
View Source
const FOOT_TO_METER float64 = 0.0254 * 12.0
View Source
const KILOGRAM_TO_POUND float64 = 1.0 / POUND_TO_KILOGRAM
View Source
const KILOGRAM_TO_SLUG float64 = 1.0 / SLUG_TO_KILOGRAM
View Source
const METER_TO_FOOT float64 = 1.0 / FOOT_TO_METER
View Source
const NEWTON_METER_TO_FOOT_POUND float64 = 1.0 / FOOT_POUND_TO_NEWTON_METER
View Source
const NEWTON_TO_POUND float64 = 1.0 / POUND_TO_NEWTON
View Source
const POUND_TO_KILOGRAM float64 = 0.45359237
View Source
const POUND_TO_NEWTON float64 = 4.448222
View Source
const SLUG_TO_KILOGRAM float64 = 14.5939029

Variables

View Source
var Epsilon = 0.5

Functions

func AssertEqual

func AssertEqual(t *testing.T, a, b interface{})

func AssertEqualWithinError

func AssertEqualWithinError(t *testing.T, a, b, c float64)

func AssertFalse

func AssertFalse(t *testing.T, a bool)

func AssertNoPanic

func AssertNoPanic(t *testing.T)

func AssertNotEqual

func AssertNotEqual(t *testing.T, a, b interface{})

func AssertPanic

func AssertPanic(t *testing.T)

func AssertTrue

func AssertTrue(t *testing.T, a bool)

func CopyBinarySearchTree

func CopyBinarySearchTree(oldTree *BinarySearchTree, selfBalancing bool)

func DegToRad

func DegToRad(x float64) float64

func FeetPerSecondToMetersPerSecond

func FeetPerSecondToMetersPerSecond(feetPerSecond float64) float64

func FeetToMeters

func FeetToMeters(feet float64) float64

func FootPoundsToNewtonMeters

func FootPoundsToNewtonMeters(footPound float64) float64

func KilogramsToPounds

func KilogramsToPounds(kilograms float64) float64

func KilogramsToSlugs

func KilogramsToSlugs(kilograms float64) float64

func MetersPerSecondToFeetPerSecond

func MetersPerSecondToFeetPerSecond(metersPerSecond float64) float64

func MetersToFeet

func MetersToFeet(meters float64) float64

func NewtonMetersToFootPounds

func NewtonMetersToFootPounds(newtonMeters float64) float64

func NewtonsToPounds

func NewtonsToPounds(newtons float64) float64

func PoundsToKilograms

func PoundsToKilograms(pound float64) float64

func PoundsToNewtons

func PoundsToNewtons(pound float64) float64

func RadToDeg

func RadToDeg(x float64) float64

func ReverseSlice

func ReverseSlice(s []interface{})

func SliceContains

func SliceContains(container []interface{}, containee interface{}) bool

func SlugsToKilograms

func SlugsToKilograms(slugs float64) float64

Types

type BinarySearchTree

type BinarySearchTree struct {
	Root *Node
	// contains filtered or unexported fields
}

func NewBinarySearchTree

func NewBinarySearchTree(selfBalancing bool) *BinarySearchTree

func (*BinarySearchTree) Clear

func (b *BinarySearchTree) Clear()

func (*BinarySearchTree) Contains

func (b *BinarySearchTree) Contains(comparable Comparable) bool

func (*BinarySearchTree) GetHeight

func (b *BinarySearchTree) GetHeight() int

func (*BinarySearchTree) GetMaximum

func (b *BinarySearchTree) GetMaximum() Comparable

func (*BinarySearchTree) GetMinimum

func (b *BinarySearchTree) GetMinimum() Comparable

func (*BinarySearchTree) GetRoot

func (b *BinarySearchTree) GetRoot() Comparable

func (*BinarySearchTree) GetSize

func (b *BinarySearchTree) GetSize() int

func (*BinarySearchTree) InOrderIterator

func (b *BinarySearchTree) InOrderIterator() *TreeIterator

func (*BinarySearchTree) Insert

func (b *BinarySearchTree) Insert(comparable Comparable) bool

func (*BinarySearchTree) IsEmpty

func (b *BinarySearchTree) IsEmpty() bool

func (*BinarySearchTree) IsSelfBalancing

func (b *BinarySearchTree) IsSelfBalancing() bool

func (*BinarySearchTree) Iterator

func (b *BinarySearchTree) Iterator() *TreeIterator

func (*BinarySearchTree) Remove

func (b *BinarySearchTree) Remove(comparable Comparable) bool

func (*BinarySearchTree) RemoveMaximum

func (b *BinarySearchTree) RemoveMaximum() Comparable

func (*BinarySearchTree) RemoveMinimum

func (b *BinarySearchTree) RemoveMinimum() Comparable

func (*BinarySearchTree) ReverseOrderIterator

func (b *BinarySearchTree) ReverseOrderIterator() *TreeIterator

func (*BinarySearchTree) SetSelfBalancing

func (b *BinarySearchTree) SetSelfBalancing(selfBalancing bool)

type Comparable

type Comparable interface {
	CompareTo(Comparable) int
}

type Listener

type Listener interface{}

type Node

type Node struct {
	Data   Comparable
	Parent *Node
	Left   *Node
	Right  *Node
}

func NewNode

func NewNode(comparable Comparable, parent, left, right *Node) *Node

func (*Node) CompareTo

func (n *Node) CompareTo(other *Node) int

func (*Node) CountNodesInTree

func (n *Node) CountNodesInTree() int

func (*Node) IsLeftChild

func (n *Node) IsLeftChild() bool

func (*Node) NewTreeIterator

func (n *Node) NewTreeIterator(ascending bool) *TreeIterator

type TreeIterator

type TreeIterator struct {
	NodeQueue []*Node
	// contains filtered or unexported fields
}

func (*TreeIterator) AssembleQueue

func (iter *TreeIterator) AssembleQueue(n *Node, ascending bool)

func (*TreeIterator) HasNext

func (iter *TreeIterator) HasNext() bool

func (*TreeIterator) Next

func (iter *TreeIterator) Next() Comparable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL