Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clamp ¶
func Clamp(number, lower, upper interface{}) (interface{}, error)
Clamp a given number to be within the specified range [lower, upper]. The function accepts three arguments: number, lower bound (lower), and upper bound (upper), all of type interface{}. It returns the clamped value within the specified range and an error if any issue occurs.
func InRange ¶
InRange checks if a given number is within the specified range [start, end). The function accepts three arguments: number, start, and end, all of type interface{}. It returns a boolean indicating whether the number is within the range and an error if any issue occurs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.