divide

Divide any two numbers

divide<return_type>(a, b);

will return the quotient of the two given numbers. The return_type specifies in which data type the result will be returned in, like shown in below example:

divide<int>(12, 3.53); //4
divide<float>(3.002, 3.522); //0.852357
divide<bool>(0, 2); //0
------------------------
divide<char>('z', 2); //'='

Last updated