Added static constuctor that imports from different Quaternion types (overrides same static contstructor of father's Point4 class)
This commit is contained in:
parent
bd8a347e86
commit
e6fbdfb9f6
|
@ -156,6 +156,13 @@ public:
|
|||
const S & V ( const int i ) const { assert(i>=0 && i<4); return Point4<S>::V(i); }
|
||||
S & V ( const int i ) { assert(i>=0 && i<4); return Point4<S>::V(i); }
|
||||
|
||||
/// constuctor that imports from different Quaternion types
|
||||
template <class Q>
|
||||
static inline Quaternion Construct( const Quaternion<Q> & b )
|
||||
{
|
||||
return Quaternion(S(b[0]),S(b[1]),S(b[2]),S(b[3]));
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue