Skip to content

Commit

Permalink
cast scalar type
Browse files Browse the repository at this point in the history
Signed-off-by: artivis <[email protected]>
  • Loading branch information
artivis committed Mar 9, 2024
1 parent 3c26c47 commit df6280c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/manif/impl/se2/SE2_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ struct CastEvaluatorImpl<SE2Base<Derived>, NewScalar> {
template <typename T>
static auto run(const T& o) -> typename Derived::template LieGroupTemplate<NewScalar> {
return typename Derived::template LieGroupTemplate<NewScalar>(
o.x(), o.y(), o.angle()
NewScalar(o.x()), NewScalar(o.y()), NewScalar(o.angle())
);
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/manif/impl/so2/SO2_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ template <typename Derived, typename NewScalar>
struct CastEvaluatorImpl<SO2Base<Derived>, NewScalar> {
template <typename T>
static auto run(const T& o) -> typename Derived::template LieGroupTemplate<NewScalar> {
return typename Derived::template LieGroupTemplate<NewScalar>(o.angle());
return typename Derived::template LieGroupTemplate<NewScalar>(NewScalar(o.angle()));
}
};

Expand Down

0 comments on commit df6280c

Please sign in to comment.