static inline void normalizeBox3(const Box3& target, const Box3& env, Box3& output) { auto scale = env.Diagonal(); auto center = env.Center(); output.Set((target.Min()-center)/scale*2.0, (target.Max()-center)/scale*2.0); }