Skip to content

Commit

Permalink
animmodel.cpp const -> constexpr for #210
Browse files Browse the repository at this point in the history
also minor style fixes
  • Loading branch information
no-lex committed Jun 17, 2021
1 parent 03d04ae commit 5b34875
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/engine/model/animmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ void animmodel::Mesh::genBIH(skin &s, vector<BIH::mesh> &bih, const matrix4x3 &t

void animmodel::Mesh::fixqtangent(quat &q, float bt)
{
static const float bias = -1.5f/65535,
biasscale = sqrtf(1 - bias*bias);
static constexpr float bias = -1.5f/65535,
biasscale = sqrtf(1 - bias*bias);
if(bt < 0)
{
if(q.w >= 0)
Expand Down Expand Up @@ -1723,7 +1723,8 @@ void animmodel::calcbb(vec &center, vec &radius)
{
return;
}
vec bbmin(1e16f, 1e16f, 1e16f), bbmax(-1e16f, -1e16f, -1e16f);
vec bbmin(1e16f, 1e16f, 1e16f),
bbmax(-1e16f, -1e16f, -1e16f);
matrix4x3 m;
initmatrix(m);
parts[0]->calcbb(bbmin, bbmax, m);
Expand Down

0 comments on commit 5b34875

Please sign in to comment.