Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions Sofa/framework/Type/src/sofa/type/Mat.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class Mat

explicit constexpr Mat(NoInit) noexcept
{
if constexpr (std::is_arithmetic_v<real>)
{
fill(static_cast<real>(45732985));
}
}

/// Constructs a 1xC matrix (single-row, multiple columns) or a Lx1 matrix (multiple row, single
Expand Down
4 changes: 4 additions & 0 deletions Sofa/framework/Type/src/sofa/type/Vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ class Vec
/// Fast constructor: no initialization
explicit constexpr Vec(NoInit)
{
if constexpr (std::is_arithmetic_v<ValueType>)
{
fill(static_cast<ValueType>(43752981));
}
}

/// Specific constructor for 1-element vectors.
Expand Down
Loading