raytracing.github.io icon indicating copy to clipboard operation
raytracing.github.io copied to clipboard

'MAXFLOAT' was not declared in this scope

Open PaulBatchelor opened this issue 9 years ago • 3 comments

Working my way though book, and this error caught me up at the end of chapter 5.

I tried compiling the code here, and I got this error as well.

I ended up fixing this by using FLT_MAX instead of MAXFLOAT. I'm assuming they are equivalent, but I really don't know.

Any idea what could be causing this? I'm using Slackware Linux 14.1, using GCC 4.8.2.

PaulBatchelor avatar Mar 28 '17 03:03 PaulBatchelor

Hey Paul. FLT_MAX is right. I believe MAXFLOAT is the same and is defined *in some * math.h. My bad.

Pete

On Mon, Mar 27, 2017 at 9:48 PM Paul Batchelor [email protected] wrote:

Working my way though book, and this error caught me up at the end of chapter 5.

I tried compiling the code here, and I got this error as well.

I ended up fixing this by using FLT_MAX instead of MAXFLOAT. I'm assuming they are equivalent, but I really don't know.

Any idea what could be causing this? I'm using Slackware Linux 14.1, using GCC 4.8.2.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/petershirley/raytracinginoneweekend/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ACq6itEBzaVpfY7UvgSC8peYy6T8Tezpks5rqIL1gaJpZM4MrGyc .

petershirley avatar Mar 28 '17 07:03 petershirley

No worries. It was a straight-forward enough fix. I will carry on then.

Just finished chapter 9, by the way. Things are starting to get sparkly and magical for me. I am loving the scope and format of this book. It's like a paint by numbers for programmers!

PaulBatchelor avatar Mar 28 '17 21:03 PaulBatchelor

Be sure to share pictures!

On Tue, Mar 28, 2017 at 3:55 PM Paul Batchelor [email protected] wrote:

No worries. It was a straight-forward enough fix. I will carry on then.

Just finished chapter 9, by the way. Things are starting to get sparkly and magical for me. I am loving the scope and format of this book. It's like a paint by numbers for programmers!

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/petershirley/raytracinginoneweekend/issues/2#issuecomment-289917108, or mute the thread https://github.com/notifications/unsubscribe-auth/ACq6ioXUu5JY7Oh3L_dJwXcVHu-XQV2qks5rqYHagaJpZM4MrGyc .

petershirley avatar Mar 28 '17 22:03 petershirley