Very basic (and probably buggy) numeric distribution / probability operations. WIP, do not use.
Wrapper for long integer multiplication / division opcodes
Aliases of D binary operators as functions. Usable in UFCS.
Like the ~ operator, but without int-promotion.
Averages args.
Return true if a <= point <= b.
Returns the number of bits needed to store a number up to n (inclusive).
Return b bound by a and c (i.e., min(max(a, b), c)).
Returns the logical value of sign(b - a) (but does not actually subtract to avoid overflow).
Integer log2.
True if x is some power of two, including 1.
Performs linear interpolation. Returns the point between low and high corresponding to the point where r is between rLow and rHigh.
Saturate v to be the largest value between itself and args.
Saturate v to be the smallest value between itself and args.
Return the next power of two after x, not including it.
Apply a binary operation consecutively to args.
Length of intersection of two segments on a line, or 0 if they do not intersect.
Round up x to the next power of two. If x is already a power of two, returns x.
Returns the sign of x, i.e, -1 if x < 0, +1 if x > 0,, or 0 if x == 0.
If x > y, swaps x and y.
Return x*x.
Sums args.
Swap the byte order in an integer value.
Get the smallest built-in unsigned integer type that can store this many bits of data.
Wraps a D binary operator into a function.
Wraps a D unary operator into a function. Does not do integer promotion.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Number stuff