Article View: comp.lang.c
Article #2137weird symplification
From: fir
Date: Thu, 03 Dec 2026 13:38
Date: Thu, 03 Dec 2026 13:38
31 lines
2206 bytes
2206 bytes
this one is a code to call frustrum culling on asteroids
if(DoFrustumCulling())
{
if(SphereInCameraFrustum(bag[i].p.pos,bag[i].radius))
{
DrawAsteroidLib3DPos(0,&bag[i].p,bag[i].scale); if(ctrl_w_toggler)
DrawWireSphere(bag[i].p.pos,bag[i].radius,0x00cfcf,12,12,20);
}
}
else
{
DrawAsteroidLib3DPos(0,&bag[i].p,bag[i].scale); if(ctrl_w_toggler)
DrawWireSphere(bag[i].p.pos,bag[i].radius,0x00cfcf,12,12,20);
}
ai sais its thhe same as
if(!DoFrustumCulling() || SphereInCameraFrustum(bag[i].p.pos,bag[i].radius))
{
DrawAsteroidLib3DPos(0,&bag[i].p,bag[i].scale);
if(ctrl_w_toggler)
DrawWireSphere(bag[i].p.pos,bag[i].radius,0x00cfcf,12,12,20);
}
i gove it as a criptic example
must say i still have a serious problem with this ! && || expersions
they are not easy to read at all (esp in this simplified form esp as
those operators precedences are as many say possibly not quite fit)
Technical Details
Message-ID:
<11errdb$cifc$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: fir <profesor.fir@gmail.com> Newsgroups: comp.lang.c Subject: weird symplification Date: Thu, 3 Dec 2026 14:38:41 +0100 Organization: A noiseless patient Spider Lines: 31 Message-ID: <11errdb$cifc$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 03 Dec 2026 13:38:52 +0000 (UTC) Injection-Info: dont-email.me; logging-data="412140"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19m5XKMBbKzRHwAEtBCzc74ntQSIu2f9EY="; posting-host="399c5b2f7a23ac57cd11dc698d13151d" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0 SeaMonkey/2.53.24 Cancel-Lock: sha1:bjpyvHzTVprKg4ep+7JVKjr39mk= sha256:kFrJoOViJjccEyBBRcqjD9hbplXYzGNmFWEIx5AX7NU= sha1:JQtPoZY2R3vkNifKliJuUk+cePA= sha256:eqvQPLf7m7Cp2OeksW8CuG9SiPbV+gxXGnDzYLbJdlM= X-Mozilla-News-Host: news://news.eternal-september.org:119