Commit 4506d1e0 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

Add operator == and != to curve_constraints

parent 96101e97
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment