Comment

Comment by layoutIfNeeded

I’ve encountered this misunderstanding many times, usually in the context of creating a rotation matrix for a given direction and “up” vector. People look baffled when I replace their elaborate Euler-rotation algorithm with three lines of code:

    z = direction
    x = up.cross(z).normalized()
    y = z.cross(x)
    M = [x, y, z]

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton