MCPcopy Create free account
hub / github.com/IoLanguage/io / UArray_normalize

Function UArray_normalize

libs/basekit/source/UArray_math.c:424–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424void UArray_normalize(UArray *self) {
425 double a;
426 UArray *s = UArray_clone(self);
427 UArray_square(s);
428 a = UArray_sumAsDouble(s);
429 UArray_free(s);
430 a = sqrt(a);
431 // double max = UArray_maxAsDouble(self);
432 UArray_divideScalarDouble_(self, a);
433}
434
435void UArray_crossProduct_(UArray *self, const UArray *other) {
436 if (self->itemType == CTYPE_float32_t &&

Callers

nothing calls this directly

Calls 5

UArray_cloneFunction · 0.85
UArray_squareFunction · 0.85
UArray_sumAsDoubleFunction · 0.85
UArray_freeFunction · 0.85

Tested by

no test coverage detected