Skip to content

Commit 7126246

Browse files
authored
Update main.c
Signed-off-by: Aadish Jain <[email protected]>
1 parent 9ef2f09 commit 7126246

File tree

1 file changed

+5
-5
lines changed
  • lib/node_modules/@stdlib/math/base/special/wrapf/src

1 file changed

+5
-5
lines changed

lib/node_modules/@stdlib/math/base/special/wrapf/src/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ float stdlib_base_wrapf( const float v, const float min, const float max ) {
4141
float vc;
4242

4343
if ( stdlib_base_is_nanf( v ) || stdlib_base_is_nanf( min ) || stdlib_base_is_nanf( max ) || max <= min ) {
44-
return 0.0 / 0.0; // NaN
44+
return 0.0f / 0.0f; // NaN
4545
}
4646
maxc = max;
4747
minc = min;
4848
vc = v;
4949

5050
// Normalize +-0 to +0...
5151
if ( stdlib_base_is_negative_zerof( vc ) ) {
52-
vc = 0.0;
52+
vc = 0.0f;
5353
}
5454
if ( stdlib_base_is_negative_zerof( minc ) ) {
55-
minc = 0.0;
55+
minc = 0.0f;
5656
}
5757
if ( stdlib_base_is_negative_zerof( maxc ) ) {
58-
maxc = 0.0;
58+
maxc = 0.0f;
5959
}
6060
// Simple case where value is already within range...
6161
if ( minc <= vc && vc < maxc ) {
@@ -64,7 +64,7 @@ float stdlib_base_wrapf( const float v, const float min, const float max ) {
6464
// Perform range reduction...
6565
delta = maxc - minc;
6666
if ( vc < minc ) {
67-
vc += delta * ( stdlib_base_truncf( ( minc - vc ) / delta ) + 1.0 );
67+
vc += delta * ( stdlib_base_truncf( ( minc - vc ) / delta ) + 1.0f );
6868
}
6969
return minc + ( stdlib_base_fmodf( vc - minc, delta ) );
7070
}

0 commit comments

Comments
 (0)