Skip to the content.

number

local number = import "github.com/jsonnet-libs/xtd/number.libsonnet"

number implements helper functions for processing number.

Index

Fields

fn inRange

inRange(v, from, to)

inRange returns true if v is in the given from/to range.`

fn maxInArray

maxInArray(arr, default=0)

maxInArray finds the biggest number in an array

fn minInArray

minInArray(arr, default=0)

minInArray finds the smallest number in an array