creates a quaternion to rotate between two unit vectors * * The resulting quaternion describes the rotation that, * if applied to the first vector, would rotate the first * vector to the second. The two vectors must be unit * vectors (of length 1). * * [icon:attention] The result is undefined if the two vectors point in opposite directions * * @name vma
| 1240 | * ``` |
| 1241 | */ |
| 1242 | static int Quat_FromTo(lua_State* L) |
| 1243 | { |
| 1244 | Vector3* v1 = CheckVector3(L, 1); |
| 1245 | Vector3* v2 = CheckVector3(L, 2); |
| 1246 | PushQuat(L, Quat::rotation(*v1, *v2)); |
| 1247 | return 1; |
| 1248 | } |
| 1249 | |
| 1250 | /*# creates a quaternion to rotate around a unit vector |
| 1251 | * |
nothing calls this directly
no test coverage detected