Documentation ¶
Index ¶
- Variables
- func Norm(angle float64) float64
- func NormRange(ang1, ang2 float64) (float64, float64)
- type Period
- func (a Period) Contains(b Period) bool
- func (a Period) Empty() bool
- func (a Period) End() float64
- func (a Period) Get() (start, end float64)
- func (a Period) Has(dir float64) bool
- func (a Period) HasIn(dir float64) bool
- func (a Period) Intersect(b Period) (n int, periods [2]Period)
- func (a Period) IsFull() bool
- func (a Period) IsIntersect(b Period) bool
- func (a Period) MedPart(alpha float64) float64
- func (a Period) Medium() float64
- func (a Period) Split(b Period) (n int, periods [3]Period)
- func (a Period) Start() float64
- func (a Period) Sub(b Period) (n int, periods [2]Period)
- func (a Period) Wide() float64
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyPeriod = Period{0, 0, false}
View Source
var FullPeriod = Period{0, 0, true}
Functions ¶
Types ¶
type Period ¶
type Period struct {
// contains filtered or unexported fields
}
start and end angle of period, both are supposed to be [0;360) [a,a) is an empty, if not isFull isFull is 360 degree full circle
func (Period) Has ¶
is dir within Period [start;end) Full contains any direction Empty has nothing Dir MUST be NORMED
func (Period) HasIn ¶
HasIn is Has without a.start point, so for period it is (start;end) Rays have nothing within Dir MUST be NORMED
func (Period) Intersect ¶
Intersect returns number of intersection (0-2) and their values Rays may intersect equal Ray or period containing ray's direction, result is ray Periods touching one start-end point do not intersect in it, so intersect results on non-ray periods can't be a ray
func (Period) IsIntersect ¶
Click to show internal directories.
Click to hide internal directories.