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
6 changes: 3 additions & 3 deletions encoder/basisu_enc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4311,7 +4311,7 @@ namespace basisu
// Positive, negative, or denormals. No NaN or Inf. Clamped to MAX_HALF_FLOAT.
inline basist::half_float fast_float_to_half_trunc_no_nan_or_inf(float f)
{
assert(!isnan(f) && !isinf(f));
assert(!std::isnan(f) && !std::isinf(f));

// Sutract 112 from the exponent, to change the bias from 127 to 15.
static const fu32 g_f_to_h{ 0x7800000 };
Expand All @@ -4325,7 +4325,7 @@ namespace basisu

inline basist::half_float fast_float_to_half_trunc_no_clamp_neg_nan_or_inf(float f)
{
assert(!isnan(f) && !isinf(f));
assert(!std::isnan(f) && !std::isinf(f));
assert((f >= 0.0f) && (f <= basist::MAX_HALF_FLOAT));

// Sutract 112 from the exponent, to change the bias from 127 to 15.
Expand All @@ -4340,7 +4340,7 @@ namespace basisu

inline basist::half_float fast_float_to_half_no_clamp_neg_nan_or_inf(float f)
{
assert(!isnan(f) && !isinf(f));
assert(!std::isnan(f) && !std::isinf(f));
assert((f >= 0.0f) && (f <= basist::MAX_HALF_FLOAT));

// Sutract 112 from the exponent, to change the bias from 127 to 15.
Expand Down
2 changes: 1 addition & 1 deletion transcoder/basisu_transcoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22119,7 +22119,7 @@ namespace basist

static BASISU_FORCE_INLINE basist::half_float fast_float_to_half_no_clamp_neg_nan_or_inf(float f)
{
assert(!isnan(f) && !isinf(f));
assert(!std::isnan(f) && !std::isinf(f));
assert((f >= 0.0f) && (f <= basist::MAX_HALF_FLOAT));

// Sutract 112 from the exponent, to change the bias from 127 to 15.
Expand Down