Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
ndcurves
Commits
4506d1e0
Commit
4506d1e0
authored
Oct 19, 2020
by
Pierre Fernbach
Browse files
Add operator == and != to curve_constraints
parent
96101e97
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/curves/curve_constraint.h
View file @
4506d1e0
...
...
@@ -39,6 +39,25 @@ struct curve_constraints : serialization::Serializable {
end_jerk
(
other
.
end_jerk
),
dim_
(
other
.
dim_
)
{}
/// \brief Check if actual curve_constraints and other are equal.
/// \param other : the other curve_constraints to check.
/// \return true if the two curve_constraints are equals.
virtual
bool
operator
==
(
const
curve_constraints
&
other
)
const
{
return
dim_
==
other
.
dim_
&&
init_vel
==
other
.
init_vel
&&
init_acc
==
other
.
init_acc
&&
init_jerk
==
other
.
init_jerk
&&
end_vel
==
other
.
end_vel
&&
end_acc
==
other
.
end_acc
&&
end_jerk
==
other
.
end_jerk
;
}
/// \brief Check if actual curve_constraint and other are different.
/// \param other : the other curve_constraint to check.
/// \return true if the two curve_constraint are different.
virtual
bool
operator
!=
(
const
curve_constraints
&
other
)
const
{
return
!
(
*
this
==
other
);
}
~
curve_constraints
()
{}
point_t
init_vel
;
point_t
init_acc
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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