| 433 | } |
| 434 | |
| 435 | void UArray_crossProduct_(UArray *self, const UArray *other) { |
| 436 | if (self->itemType == CTYPE_float32_t && |
| 437 | other->itemType == CTYPE_float32_t && self->size > 2 && |
| 438 | other->size > 2) { |
| 439 | float32_t *a = (float32_t *)self->data; |
| 440 | float32_t *b = (float32_t *)other->data; |
| 441 | |
| 442 | float32_t i = (a[1] * b[2]) - (a[2] * b[1]); |
| 443 | float32_t j = (a[2] * b[0]) - (a[0] * b[2]); |
| 444 | float32_t k = (a[0] * b[1]) - (a[1] * b[0]); |
| 445 | |
| 446 | a[0] = i; |
| 447 | a[1] = j; |
| 448 | a[2] = k; |
| 449 | |
| 450 | UArray_changed(self); |
| 451 | |
| 452 | return; |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | double UArray_distanceTo_(const UArray *self, const UArray *other) { |
| 457 | if (self->itemType == CTYPE_float32_t && |
nothing calls this directly
no test coverage detected