float dot = dot(v0, v1);
float radian = acos(dot);
more safe:
dot = Max(-1, Min(dot(v0, v1), 1); // make sure the dot is [-1, 1].
radian = acos(dot);
float radian = acos(dot);
more safe:
dot = Max(-1, Min(dot(v0, v1), 1); // make sure the dot is [-1, 1].
radian = acos(dot);
https://docs.google.com/document/pub?id=1KyKbHUXfrXh-7L0g4cP-l2QcqVDsmYPTyBJXjGAtXhA
没有评论:
发表评论