Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
fa27a11f
Unverified
Commit
fa27a11f
authored
Jan 03, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some quaternion additions
parent
b0451777
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
+16
-1
include/cif++/point.hpp
+16
-1
No files found.
include/cif++/point.hpp
View file @
fa27a11f
...
@@ -54,7 +54,7 @@ class quaternion_type
...
@@ -54,7 +54,7 @@ class quaternion_type
public
:
public
:
using
value_type
=
T
;
using
value_type
=
T
;
constexpr
explicit
quaternion_type
(
value_type
const
&
value_a
=
value_type
(),
value_type
const
&
value_b
=
value_type
(),
value_type
const
&
value_c
=
value_type
(),
value_type
const
&
value_d
=
value_type
()
)
constexpr
explicit
quaternion_type
(
value_type
const
&
value_a
=
{},
value_type
const
&
value_b
=
{},
value_type
const
&
value_c
=
{},
value_type
const
&
value_d
=
{}
)
:
a
(
value_a
)
:
a
(
value_a
)
,
b
(
value_b
)
,
b
(
value_b
)
,
c
(
value_c
)
,
c
(
value_c
)
...
@@ -305,6 +305,21 @@ class quaternion_type
...
@@ -305,6 +305,21 @@ class quaternion_type
constexpr
value_type
get_c
()
const
{
return
c
;
}
constexpr
value_type
get_c
()
const
{
return
c
;
}
constexpr
value_type
get_d
()
const
{
return
d
;
}
constexpr
value_type
get_d
()
const
{
return
d
;
}
constexpr
bool
operator
==
(
const
quaternion_type
&
rhs
)
const
{
return
a
==
rhs
.
a
and
b
==
rhs
.
b
and
c
==
rhs
.
c
and
d
==
rhs
.
d
;
}
constexpr
bool
operator
!=
(
const
quaternion_type
&
rhs
)
const
{
return
a
!=
rhs
.
a
or
b
!=
rhs
.
b
or
c
!=
rhs
.
c
or
d
!=
rhs
.
d
;
}
constexpr
operator
bool
()
const
{
return
operator
!=
({});
}
private
:
private
:
value_type
a
,
b
,
c
,
d
;
value_type
a
,
b
,
c
,
d
;
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment