Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBoundingBox ¶
func GetBoundingBox(numbers []complex128) (complex128, complex128)
GetBoundingBox returns two complex numbers that contain all of the non-infinity numbers inside.
The first number is the minimum (all numbers have a real & imaginary component greater than or equal to it) The second number is the maximum (all numbers have a real & imaginary component less than or equal to it) If numbers is an empty slice, returns (0+0i, 0+0i)
func ScaleValueBetweenTwoRanges ¶
func ScaleValueBetweenTwoRanges(value, oldRangeMin, oldRangeMax, newRangeMin, newRangeMax float64) float64
ScaleValueBetweenTwoRanges translates value (exists between min1 and max2)
to somewhere between min2 and max2. Linear scale is assumed. So if value is 25% between min1 and max1, then this will return a float64 that is 25% between min2 and max2.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.