Handlebars.Net.Helpers
Handlebars.Net.Helpers copied to clipboard
Wiki Documentation for Math.Modulo is incorrect
https://github.com/Handlebars-Net/Handlebars.Net.Helpers/wiki/Math#mod Incorrectly calls the operator Mod when it is in fact Modulo
@greyknight79
You mean:
That the method is called Mod and actually uses % which is actually the remainder.
int a = 10;
int b = 3;
int result = a % b; // result is 1 because 10 divided by 3 is 3 with a remainder of 1
and
int a = -10;
int b = 3;
int result = a % b; // result is -1 because the sign follows the dividend (-10)
Where Modulo always returns positive?