Comment mettre de la couleur dans votre #raytracing de la famille Hexacone..

#local R = rand(Rng1); #if (R < 0.25) texture { tPlasticOrange } #elseif (R < 0.50) texture { tPlasticBlue } #elseif (R < 0.75) texture { tPlasticPrune } #else texture { tPlasticGreen } #end // if

#Povray, c'est trop cool !

#if implementation(string, utf16)
hogehoge...
#elseif implementation(string, unicodeScalar)
fugafuga...
#else
#error("なんですかこの言語")
#endif

みたいな地獄になってもいいから……

Dumb thing I only realized recently because dumb. If you're writing logic targeting all Apple platforms and need to use different types or write different logic for macOS and any other platform, it's best to do:

#if canImport(UIKit)
// Stuff for things other than mac
#elseif canImport(Cocoa)
// Stuff only for mac
#endif

Mac Catalyst can import both but you normally want to use UIKit there so it goes first (it's a tiny subset of Cocoa you can access there).

whippet: towards a new local maximum -- wingolog