Skip to content

Commit d6f26d0

Browse files
committed
Move SquareRoot node to use new FastLengthSqrt func to optimise non relaxed FastSIMD
1 parent 86997eb commit d6f26d0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/FastNoise/Generators/Modifiers.inl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,7 @@ class FastSIMD::DispatchClass<FastNoise::SquareRoot, SIMD> final : public virtua
280280
{
281281
float32v value = this->GetSourceValue( mSource, seed, pos... );
282282

283-
float32v invSqrt = FS::InvSqrt( FS::Abs( value ) );
284-
285-
return FS::Masked( invSqrt != float32v( INFINITY ), value * invSqrt );
283+
return FastLengthSqrt( FS::Abs( value ) );
286284
}
287285
};
288286

0 commit comments

Comments
 (0)