Skip to content

Commit

Permalink
AP_Math: quaternion: add contructor from float[4]
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed Mar 27, 2018
1 parent 8a36f05 commit c343a28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/AP_Math/quaternion.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ class Quaternion {
{
}

// setting constructor
Quaternion(const float _q[4]) :
q1(_q[0]), q2(_q[1]), q3(_q[2]), q4(_q[3])
{
}

// function call operator
void operator()(const float _q1, const float _q2, const float _q3, const float _q4)
{
Expand Down

0 comments on commit c343a28

Please sign in to comment.