Functions Index :: I :: IntBs

[<< up one level]

Module:

numeric :: rounding

Definition:

IntBs(float x, int "base")

Description:

An extension to the Int standard Avisynth function for arbitrary (integer) base base.[1] It returns the base-base truncated integer of x (ie the largest integral multiple of base with absolute value less or equal to Abs(x)).

Examples:

f1 = IntBs(3.3, 2) # f1 == 2.0

f2 = IntBs(7.3, 3) # f2 == 6.0

f3 = IntBs(7.3, 1) # f3 == 7.0

 

[<< top]

 


[1]:Like the Int standard Avisynth function, IntBs is symmetrical around the axis origin and not periodic.

Consequently, the following equalities hold:

Int(x) = Ceil(x), x < 0 | Floor(x), x > 0

IntBs(x, b) = CeilBs(x, b), x < 0 | FloorBs(x, b), x > 0