quaternion: add docstrings
This commit is contained in:
parent
00515078f9
commit
64ea4fb6d4
@ -11,7 +11,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Copyright 2011-2016 Danny Robson <danny@nerdcruft.net>
|
||||
* Copyright 2011-2018 Danny Robson <danny@nerdcruft.net>
|
||||
*/
|
||||
|
||||
#ifndef __UTIL_QUATERNION_HPP
|
||||
@ -44,13 +44,18 @@ namespace util {
|
||||
static quaternion angle_axis (T radians, vector<3,T> axis);
|
||||
static quaternion from_euler (vector<3,T>);
|
||||
|
||||
static quaternion from_to (vector<3,T>, vector<3,T>);
|
||||
/// build a quaternion that represents the rotation from a to b
|
||||
static quaternion from_to (vector<3,T> a, vector<3,T> b);
|
||||
|
||||
/// build a quaternion that represents the rotation needed to look at
|
||||
/// a direction with a given up direction
|
||||
static quaternion look (vector<3,T> fwd, vector<3,T> up);
|
||||
|
||||
matrix4<T> as_matrix (void) const;
|
||||
|
||||
static constexpr
|
||||
quaternion<T> identity (void)
|
||||
quaternion<T>
|
||||
identity (void)
|
||||
{
|
||||
return { 1, 0, 0, 0 };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user