std.math.acos
pub fn acos(x: anytype) @TypeOf(x)
Returns the arc-cosine of x.
- Kind
- function
- Module
std.math
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.math in the Zig reference. This page has 148 cards.
pub fn acos(x: anytype) @TypeOf(x)
Returns the arc-cosine of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn acosh(x: anytype) @TypeOf(x)
Returns the hyperbolic arc-cosine of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn add(comptime T: type, a: T, b: T) (error{Overflow}!T)
Returns the sum of a and b.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn alignCast(comptime alignment: Alignment, ptr: anytype) AlignCastError!AlignCastResult(alignment, @TypeOf(ptr))
Align cast a pointer but return an error if it's the wrong alignment.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn approxEqAbs(comptime T: type, x: T, y: T, tolerance: T) bool
Performs an approximate comparison of two floating point values `x` and `y`.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn approxEqRel(comptime T: type, x: T, y: T, tolerance: T) bool
Performs an approximate comparison of two floating point values `x` and `y`.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn asin(x: anytype) @TypeOf(x)
Returns the arc-sin of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn asinh(x: anytype) @TypeOf(x)
Returns the hyperbolic arc-sin of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn atan(x: anytype) @TypeOf(x)
Returns the arc-tangent of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn atan2(y: anytype, x: anytype) @TypeOf(x, y)
Returns the arc-tangent of y/x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn atanh(x: anytype) @TypeOf(x)
Returns the hyperbolic arc-tangent of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn boolMask(comptime MaskInt: type, value: bool) MaskInt
Returns a mask of all ones if value is true, and a mask of all zeroes if value is false.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ByteAlignedInt(comptime T: type) type
Aligns the given integer type bit width to a width divisible by 8.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cast(comptime T: type, x: anytype) ?T
Cast an integer to a different integer type.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cbrt(x: anytype) @TypeOf(x)
Returns the cube root of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ceil(value: anytype) @TypeOf(value)
Returns the smallest integral value not less than the given floating point number.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ceilPowerOfTwo(comptime T: type, value: T) (error{Overflow}!T)
Returns the next power of two (if the value is not already a power of two).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ceilPowerOfTwoAssert(comptime T: type, value: T) T
Returns the next power of two (if the value is not already a power of two).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ceilPowerOfTwoPromote(comptime T: type, value: T) @Int(@typeInfo(T).int.signedness, @typeInfo(T).int.bits + 1)
Returns the next power of two (if the value is not already a power of two).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn clamp(val: anytype, lower: anytype, upper: anytype) @TypeOf(val, lower, upper)
Odd ramp function ``` | _____ | / |/ -------/------- /| _____/ | | ``` Limit val to the inclusive range [lower, upper].
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn compare(a: anytype, op: CompareOperator, b: anytype) bool
This function does the same thing as comparison operators, however the operator is a runtime-known enum value.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn reverse(op: CompareOperator) CompareOperator
Reverse the direction of the comparison.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn comptimeMod(num: anytype, comptime denom: comptime_int) IntFittingRange(0, denom - 1)
Return the mod of `num` with the smallest integer type.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn copysign(magnitude: anytype, sign: @TypeOf(magnitude)) @TypeOf(magnitude)
Returns a value with the magnitude of `magnitude` and the sign of `sign`.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cos(value: anytype) @TypeOf(value)
Cosine trigonometric function on a floating point number.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cosh(x: anytype) @TypeOf(x)
Returns the hyperbolic cosine of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn degreesToRadians(ang: anytype) if (@TypeOf(ang) == comptime_int) comptime_float else @TypeOf(ang)
Converts an angle in degrees to radians.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn divCeil(comptime T: type, numerator: T, denominator: T) !T
Divide numerator by denominator, rounding toward positive infinity.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn divExact(comptime T: type, numerator: T, denominator: T) !T
Divide numerator by denominator.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn divFloor(comptime T: type, numerator: T, denominator: T) !T
Divide numerator by denominator, rounding toward negative infinity.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn divTrunc(comptime T: type, numerator: T, denominator: T) !T
Divide numerator by denominator, rounding toward zero.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Euler's number (e).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn exp(value: anytype) @TypeOf(value)
Base-e exponential function on a floating point number.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn exp2(value: anytype) @TypeOf(value)
Base-2 exponential function on a floating point number.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn expm1(x: anytype) @TypeOf(x)
Returns e raised to the power of x, minus 1 (e^x - 1).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromFloat(x: f80) F80
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toFloat(self: F80) f80
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn floor(value: anytype) @TypeOf(value)
Returns the largest integral value not greater than the given floating point number.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn floorPowerOfTwo(comptime T: type, value: T) T
Returns the nearest power of two less than or equal to value, or zero if value is less than or equal to zero.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Frexp(comptime T: type) type
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn frexp(x: anytype) Frexp(@TypeOf(x))
Breaks x into a normalized fraction and an integral power of two. f == frac * 2^exp, with |frac| in the interval [0.5, 1).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn gamma(comptime T: type, x: T) T
Returns the gamma function of x, gamma(x) = factorial(x - 1) for integer x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn gcd(a: anytype, b: anytype) @TypeOf(a, b)
Returns the greatest common divisor (GCD) of two unsigned integers (`a` and `b`) which are not both zero.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn hypot(x: anytype, y: anytype) @TypeOf(x, y)
Returns sqrt(x * x + y * y), avoiding unnecessary overflow and underflow.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ilogb(x: anytype) i32
Returns the binary exponent of x as an integer.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn IntFittingRange(comptime from: comptime_int, comptime to: comptime_int) type
Returns the smallest integer type that can hold both from and to.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isFinite(x: anytype) bool
Returns whether x is a finite value.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isInf(x: anytype) bool
Returns whether x is an infinity, ignoring sign.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isNan(x: anytype) bool
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isNegativeInf(x: anytype) bool
Returns whether x is an infinity with a negative sign.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isNegativeZero(x: anytype) bool
Returns whether x is negative zero.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isNormal(x: anytype) bool
Returns whether x is neither zero, subnormal, infinity, or NaN.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isPositiveInf(x: anytype) bool
Returns whether x is an infinity with a positive sign.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isPositiveZero(x: anytype) bool
Returns whether x is positive zero.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isPowerOfTwo(int: anytype) bool
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isSignalNan(x: anytype) bool
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn lcm(a: anytype, b: anytype) @TypeOf(a, b)
Returns the least common multiple (LCM) of two integers (`a` and `b`).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn ldexp(x: anytype, n: i32) @TypeOf(x)
Returns x * 2^n.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn lerp(a: anytype, b: anytype, t: anytype) @TypeOf(a, b, t)
Performs linear interpolation between *a* and *b* based on *t*. *t* ranges from 0.0 to 1.0, but may exceed these bounds.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn lgamma(comptime T: type, x: T) T
Returns the natural logarithm of the absolute value of the gamma function.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log(comptime T: type, base: T, x: T) T
Returns the logarithm of x for the provided base.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log1p(x: anytype) @TypeOf(x)
Returns the natural logarithm of 1 + x with greater accuracy when x is near zero.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log2(x: anytype) @TypeOf(x)
Returns the base-2 logarithm of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log2_int(comptime T: type, x: T) Log2Int(T)
Return the log base 2 of integer value x, rounding down to the nearest integer.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log2_int_ceil(comptime T: type, x: T) Log2IntCeil(T)
Return the log base 2 of integer value x, rounding up to the nearest integer.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Log2Int(comptime T: type) type
Returns an unsigned int type that can hold the number of bits in T - 1.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Log2IntCeil(comptime T: type) type
Returns an unsigned int type that can hold the number of bits in T.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log10(x: anytype) @TypeOf(x)
Returns the base-10 logarithm of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log10_int(x: anytype) std.math.Log2Int(@TypeOf(x))
Return the log base 10 of integer value x, rounding down to the nearest integer.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log_int(comptime T: type, base: T, x: T) Log2Int(T)
Returns the logarithm of `x` for the provided `base`, rounding down to the nearest integer.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn lossyCast(comptime T: type, value: anytype) T
Cast a value to a different type.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn maxInt(comptime T: type) comptime_int
Returns the maximum value of integer type T.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Min(comptime A: type, comptime B: type) type
Given two types, returns the smallest one which is capable of holding the full range of the minimum value.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn minInt(comptime T: type) comptime_int
Returns the minimum value of integer type T.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mod(comptime T: type, numerator: T, denominator: T) !T
Returns numerator modulo denominator, or an error if denominator is zero or negative.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Modf(comptime T: type) type
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn modf(x: anytype) Modf(@TypeOf(x))
Returns the integer and fractional floating-point numbers that sum to x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mul(comptime T: type, a: T, b: T) (error{Overflow}!T)
Returns the product of a and b.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mulWide(comptime T: type, a: T, b: T) @Int(@typeInfo(T).int.signedness, @typeInfo(T).int.bits * 2)
Multiply a and b.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn negate(x: anytype) !@TypeOf(x)
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn negateCast(x: anytype) !@Int(.signed, @bitSizeOf(@TypeOf(x)))
Returns the negation of the integer parameter.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn nextAfter(comptime T: type, x: T, y: T) T
Returns the next representable value after `x` in the direction of `y`.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn order(a: anytype, b: anytype) Order
Given two numbers, this function returns the order they are with respect to each other.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn compare(self: Order, op: CompareOperator) bool
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn differ(self: Order) ?Order
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn invert(self: Order) Order
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Phi or Golden ratio constant (Φ) = (1 + sqrt(5))/2.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Archimedes' constant (π).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn pow(comptime T: type, x: T, y: T) T
Returns x raised to the power of y (x^y).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn powi(comptime T: type, x: T, y: T) (error{ Overflow, Underflow, }!T)
Returns the power of x raised by the integer y (x^y).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn radiansToDegrees(ang: anytype) if (@TypeOf(ang) == comptime_int) comptime_float else @TypeOf(ang)
Converts an angle in radians to degrees.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn raiseDivByZero() void
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn raiseInexact() void
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn raiseInvalid() void
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn raiseOverflow() void
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn raiseUnderflow() void
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rem(comptime T: type, numerator: T, denominator: T) !T
Returns the remainder when numerator is divided by denominator, or an error if denominator is zero or negative.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rotl(comptime T: type, x: T, r: anytype) T
Rotates left.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rotr(comptime T: type, x: T, r: anytype) T
Rotates right.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn round(value: anytype) @TypeOf(value)
Rounds the given floating point number to the nearest integer.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Returns a * FLT_RADIX ^ exp.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn shl(comptime T: type, a: T, shift_amt: anytype) T
Shifts left.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn shlExact(comptime T: type, a: T, shift_amt: Log2Int(T)) !T
Shifts a left by shift_amt.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn shr(comptime T: type, a: T, shift_amt: anytype) T
Shifts right.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sign(n: anytype) SignOf(@TypeOf(n))
Returns -1, 0, or 1.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn signbit(x: anytype) bool
Returns whether x is negative or negative 0.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn signExtend(To: type, n: anytype) To
Increases the bit width of an integer by copying the most significant bit.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sin(value: anytype) @TypeOf(value)
Sine trigonometric function on a floating point number.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sinh(x: anytype) @TypeOf(x)
Returns the hyperbolic sine of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sqrt(x: anytype) Sqrt(@TypeOf(x))
Returns the square root of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sub(comptime T: type, a: T, b: T) (error{Overflow}!T)
Returns a - b, or an error on overflow.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn tan(value: anytype) @TypeOf(value)
Tangent trigonometric function on a floating point number.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn tanh(x: anytype) @TypeOf(x)
Returns the hyperbolic tangent of x.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Circle constant (τ).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn trunc(value: anytype) @TypeOf(value)
Rounds the given floating point number to an integer, towards zero.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn wrap(x: anytype, r: anytype) @TypeOf(x)
Odd sawtooth function ``` | / | / / / |/ / --/----/----/-- / /| / / / | / | ``` Limit x to the half-open interval [-r, r).
std.mathSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.