TIL good real-life examples in Accelerate framework documentation
Read docs simd library which is part of Accelerate framework. Working with Vectors gives interesting real life examples for color-to-grayscale conversion, calculate length and distance (Pythagorean theorem) and compare distances, calculate reflection and refraction vectors, calculate the normal of a triangle, interpolate between values. Working with Matrices gives examples for solving simultaneous equations, transforming (translating, rotating, and scaling) vectors with matrix multiplication. Working with Quaternions gives examples for rotating a point around a sphere, interpolating between two and multiple points on a sphere. Example code explains how to work with quaternions. vForce transcendental and trigonometric functions on vectors of any length, vectorised inside for current architecture, including exotics like copysign
. I guess any vector imaging function one could imagine exists there.