MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / normalize

Function normalize

examples/graphics/fractal.cpp:61–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61array normalize(array a) {
62 float mx = af::max<float>(a);
63 float mn = af::min<float>(a);
64 return (a - mn) / (mx - mn);
65}
66
67int main(int argc, char **argv) {
68 int device = argc > 1 ? atoi(argv[1]) : 0;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected