File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,20 +18,20 @@ float soft_atan2( float y, float x )
18
18
static const float b = 0.596227f ;
19
19
20
20
// Extract the sign bits
21
- uint32_t ux_s = sign_mask & (uint32_t & )x ;
22
- uint32_t uy_s = sign_mask & (uint32_t & )y ;
21
+ uint32_t ux_s = sign_mask & (( uint32_t ) & )x ;
22
+ uint32_t uy_s = sign_mask & (( uint32_t ) & )y ;
23
23
24
24
// Determine the quadrant offset
25
25
float q = (float )( ( ~ux_s & uy_s ) >> 29 | ux_s >> 30 );
26
26
27
27
// Calculate the arctangent in the first quadrant
28
- float bxy_a = fabs ( b * x * y );
28
+ float bxy_a = ( float ) fabs ( b * x * y );
29
29
float num = bxy_a + y * y ;
30
30
float atan_1q = num / ( x * x + bxy_a + num );
31
31
32
32
// Translate it to the proper quadrant
33
- uint32_t uatan_2q = (ux_s ^ uy_s ) | (uint32_t & )atan_1q ;
34
- return q + (float & )uatan_2q ;
33
+ uint32_t uatan_2q = (ux_s ^ uy_s ) | (( uint32_t ) & )atan_1q ;
34
+ return q + (( float ) & )uatan_2q ;
35
35
}
36
36
37
37
#endif /* MP_SOFT_ATAN */
You can’t perform that action at this time.
0 commit comments