Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions bindings/SofaTypes/src/SofaPython3/SofaTypes/Binding_Vec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,8 @@ T addCross(T p)
{
p.def("cross", [](typename T::type& a, typename T::type& b)
{
if constexpr (T::type::spatial_dimensions == 2 || T::type::spatial_dimensions == 3)
{
return sofa::type::cross(a, b);
}
else
{
// can only call cross with vec2 or vec3
return T();
}
static_assert(T::type::spatial_dimensions == 2 || T::type::spatial_dimensions == 3, "Cross product function can only be used with Vec2 and Vec3");
return sofa::type::cross(a, b);
});
return p;
}
Expand Down