Table of Contents

Class Int32Util

Namespace
PaintDotNet
Assembly
PaintDotNet.Fundamentals.dll
public static class Int32Util
Inheritance
Int32Util
Inherited Members

Methods

ClampSafe(int, int, int)
ClampToByte(int)
DivLog2RoundDown(int, int)

Divides x by 2^log2N, and rounds down.

DivLog2RoundUp(int, int)

Divides x by 2^log2N, and rounds up.

GreatestCommonDivisor(int, int)
IncrementRoundUp(int, int)

Rounds x to a multiple of n which is greater than or equal to x.

IsClamped(int, int, int)
Log2(int)

Returns log2(x) for positive values of x.

Log2RoundUp(int)
Max(int, int, int)
Max(int, int, int, int)
Max(int, params int[])
Min(int, int, int)
Min(int, int, int, int)
Min(int, params int[])
Pow2RoundDown(int)

Returns the largest power of 2 which is less than or equal to x, or 0 if x is 0, for positive values.

Pow2RoundUp(int)

Returns the smallest power of 2 which is greater than or equal to x, for positive values less than or equal to 2^30.

RotateLeft(int, int)
RotateRight(int, int)
RoundDownLog2N(int, int)

Rounds x to a multiple of 2^log2N which is greater than or equal to x.

RoundDownN(int, int)
RoundUpLog2N(int, int)

Rounds x to a multiple of 2^log2N which is greater than or equal to x.

RoundUpN(int, int)
SafeIsClamped(int, int, int)