====== SafeDiv ====== {{tag>math todo}} ''int SafeDiv(int num, int den)'' ===== Description ===== Performs safe division: if denumerator is 0, the result is 0 and no error happens. Integer version, for fixed-point numbers see [[SafeFixedDiv]]. ===== Examples ===== SafeDiv(6, 3) -> 2 SafeDiv(6, 0) -> 0