MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / pfmod

Function pfmod

source/core/StarMathCommon.hpp:209–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207// Same as pmod but for float like values.
208template <typename Float>
209Float pfmod(Float a, Float m) {
210 if (m == 0)
211 return a;
212
213 return a - m * floor(a / m);
214}
215
216// Finds the *smallest* distance (in absolute value terms) from b to a (a - b)
217// in a non-euclidean wrapping number line. Suppose size is 100, wrapDiff(10,

Callers 6

dayCycleMethod · 0.85
materialParticleColorMethod · 0.85
WormCaveSectorMethod · 0.85
updateMethod · 0.85
hueShiftMethod · 0.85
wrapDiffFFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected