Documentation ¶
Index ¶
Constants ¶
View Source
const PrecisionThreshold = 1
Variables ¶
This section is empty.
Functions ¶
func MustFloat32 ¶ added in v0.1.0
MustFloat32 converts to a float32 and panics if there is loss of precision
Types ¶
type CoordinateMapper ¶
type CoordinateMapper struct {
// contains filtered or unexported fields
}
func NewRawCalcElement ¶
func NewRawCalcElement(rect *Rect, scale float32) *CoordinateMapper
func (CoordinateMapper) DeScaleAt ¶
func (c CoordinateMapper) DeScaleAt(i int, factor ScaleFactor) Transform
func (CoordinateMapper) ScaleAt ¶
func (c CoordinateMapper) ScaleAt(i int, factor ScaleFactor) Transform
type Mapper ¶
type Mapper interface { ScaleAt(i int, factor ScaleFactor) Transform DeScaleAt(i int, factor ScaleFactor) Transform }
type MonotonicMapper ¶
type MonotonicMapper struct { *Rect // contains filtered or unexported fields }
MonotonicMapper scales values for x and y linearly to certain ranges and vice versa
func NewMonotonicMapper ¶
func NewMonotonicMapper(scale float32) *MonotonicMapper
NewMonotonicMapper creates a new linearly scale calculation element
func (MonotonicMapper) DeScaleAt ¶
func (l MonotonicMapper) DeScaleAt(i int, factor ScaleFactor) Transform
func (*MonotonicMapper) Max ¶
func (l *MonotonicMapper) Max(max V) bool
func (*MonotonicMapper) Min ¶
func (l *MonotonicMapper) Min(min V) bool
func (MonotonicMapper) ScaleAt ¶
func (l MonotonicMapper) ScaleAt(i int, factor ScaleFactor) Transform
type StackedMapper ¶
type StackedMapper struct {
// contains filtered or unexported fields
}
func NewStackedMapper ¶
func NewStackedMapper(stack ...Mapper) *StackedMapper
func (StackedMapper) DeScaleAt ¶
func (s StackedMapper) DeScaleAt(i int, factor ScaleFactor) Transform
func (StackedMapper) ScaleAt ¶
func (s StackedMapper) ScaleAt(i int, factor ScaleFactor) Transform
type V ¶
type V []float32
Vector defines a point in n dimensional space
type VoidCalcMapper ¶
type VoidCalcMapper struct { }
func (VoidCalcMapper) DeScaleAt ¶
func (v VoidCalcMapper) DeScaleAt(i int, factor ScaleFactor) Transform
func (VoidCalcMapper) ScaleAt ¶
func (v VoidCalcMapper) ScaleAt(i int, factor ScaleFactor) Transform
Click to show internal directories.
Click to hide internal directories.