Documentation ¶
Overview ¶
Package r3 implements types and functions for working with geometry in ℝ³.
See ../s2 for a more detailed overview.
Index ¶
- type Vector
- func (v Vector) Abs() Vector
- func (v Vector) Add(ov Vector) Vector
- func (v Vector) Angle(ov Vector) s1.Angle
- func (v Vector) ApproxEqual(ov Vector) bool
- func (v Vector) Cross(ov Vector) Vector
- func (v Vector) Distance(ov Vector) float64
- func (v Vector) Dot(ov Vector) float64
- func (v Vector) IsUnit() bool
- func (v Vector) Mul(m float64) Vector
- func (v Vector) Norm() float64
- func (v Vector) Norm2() float64
- func (v Vector) Normalize() Vector
- func (v Vector) Ortho() Vector
- func (v Vector) String() string
- func (v Vector) Sub(ov Vector) Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vector ¶
type Vector struct {
X, Y, Z float64
}
Vector represents a point in ℝ³.
func (Vector) ApproxEqual ¶
ApproxEqual reports whether v and ov are equal within a small epsilon.
Click to show internal directories.
Click to hide internal directories.