Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //: twitch: www.twitch.com/kanjicoder
- //: test rig for "modulus-without-modulus" code snippet for GLSL shader code.
- #include <stdio.h> //:for: printf(...)
- #include <math.h> //:for: floor(....)
- int main( void ){
- printf("[BEG:main]\n");
- #define F_L_O_O_R floor
- float MODDED_VALUE;
- float F32_BAS_001 =( 7 );
- float F32_DIV_002 =( 3 );
- //: F32_BAS_001 == 7
- //: |
- //: V
- //:[ 0 ][ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ]
- //:[ ][ ][ ]
- //:[ 0 ][ 1 ][ 2 ][ 0 ][ 1 ][ 2 ][ 0 ][ 1 ][ 2 ]
- //: ^
- //: |
- //: MODDED_VALUE == 1
- MODDED_VALUE=( //:@_SC_MOD_WITHOUT_MOD_@://
- (F32_BAS_001)-
- (F_L_O_O_R( (F32_BAS_001)/F32_DIV_002 )
- *F32_DIV_002 ));;
- printf("[MODDED_VALUE]:%f\n" , MODDED_VALUE );
- #undef F_L_O_O_R
- printf("[END:main]\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement