MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / Mod

Method Mod

StereoKit/Math/SKMath.cs:58–62  ·  view source on GitHub ↗

Modulus, works better than '%' for negative values. Numerator Denominator x modulus mod

(int x, int mod)

Source from the content-addressed store, hash-verified

56 /// <param name="mod">Denominator</param>
57 /// <returns>x modulus mod</returns>
58 public static int Mod(int x, int mod)
59 {
60 int r = x % mod;
61 return r<0 ? r+mod : r;
62 }
63 }
64}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected