Programming Search⌘K

std.math

The entries of std.math in the Zig reference. This page has 148 cards.

std.math.clamp

pub fn clamp(val: anytype, lower: anytype, upper: anytype) @TypeOf(val, lower, upper)

Odd ramp function ``` | _____ | / |/ -------/------- /| _____/ | | ``` Limit val to the inclusive range [lower, upper].

Kind
function
Module
std.math

Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.