Skip to content

Commit

Permalink
Readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn committed Aug 15, 2020
1 parent 15b10a2 commit 9bd6984
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/FastSIMD/FunctionList.h
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,12 @@ namespace FastSIMD
value -= FS_Floor_f32( value * float32v( 0.1591549f ) ) * float32v( 6.283185f );

mask32v geHalfPi = FS_GreaterEqualThan_f32( value, float32v( 1.570796f ) );
mask32v geHalfPi2 = FS_GreaterEqualThan_f32( value, float32v( 3.141593f ) );
mask32v geHalfPi3 = FS_GreaterEqualThan_f32( value, float32v( 4.7123889f ) );

float32v cosAngle;
cosAngle = FS_BitwiseXor_f32( value, FS_Mask_f32( FS_BitwiseXor_f32( value, float32v( 3.141593f ) - value ), geHalfPi ) );
cosAngle = FS_BitwiseXor_f32( cosAngle, FS_Mask_f32( FS_Casti32_f32( int32v( 0x80000000 ) ), FS_GreaterEqualThan_f32( value, float32v( 3.141593f ) ) ) );
cosAngle = FS_BitwiseXor_f32( cosAngle, FS_Mask_f32( FS_Casti32_f32( int32v( 0x80000000 ) ), geHalfPi2 ) );
cosAngle = FS_BitwiseXor_f32( cosAngle, FS_Mask_f32( FS_BitwiseXor_f32( cosAngle, float32v( 6.283185f ) - value ), geHalfPi3 ) );

cosAngle *= cosAngle;
Expand Down

0 comments on commit 9bd6984

Please sign in to comment.