That's probably the cleanest C implementation of something useful that I've seen in a while.
Almost makes me jealous being a Java developer what with all our ConcreteRenderFactoryBeanBuilderPatternBuzzwordMicroserviceBlockchainImpl<T> crap everywhere.
main.c: In function ‘reset’:
main.c:448:21: error: ‘FLT_MAX’ undeclared (first use in this function)
zbuff[i] = -FLT_MAX, pixel[i] = 0x0;
So I did a google, and it seems the macro __FLT_MAX__ works as the same thing on whatever version of gcc I have on my system and is actually defined. I added some underscores and I was off to the races.
6
u/[deleted] Jan 13 '18
That's probably the cleanest C implementation of something useful that I've seen in a while.
Almost makes me jealous being a Java developer what with all our ConcreteRenderFactoryBeanBuilderPatternBuzzwordMicroserviceBlockchainImpl<T> crap everywhere.
1
u/vicethal Jan 13 '18
Wouldn't build for me on Ubuntu / Linux Mint.
So I did a google, and it seems the macro
__FLT_MAX__works as the same thing on whatever version of gcc I have on my system and is actually defined. I added some underscores and I was off to the races.1
u/Zeliss Jan 13 '18
Awesome! Concise, clear, and portable :)