int32 nominator
int32 denominator
int32 remainder of division by denominator
int32 a divided by denominator
bool32.tgl pendulum
int r;
int denominator = inlet_denominator * (1 + param_pendulum);
if (inlet_a >= 0)
r = ((unsigned int)inlet_a) / denominator;
else
r = -(((unsigned int)(denominator - inlet_a)) / denominator);
outlet_div = r;
r = inlet_a - (r * denominator);
outlet_rem = r > inlet_denominator ? (inlet_denominator << 1) - r : r;