> On Aug 14, 2019, at 3:15 PM, James Richters <ja...@productionautomation.net> 
> wrote:
> 
> I find 
>  viewTransform := TMat4.Identity;
>  viewTransform := viewTransform  * TMat4.Translate(x, y, 1);
>  viewTransform := viewTransform  * TMat4.Scale(scale, scale, 1);
> 
> much more readable.  

then by having both we all win. I never said we shouldn’t both, I’m just 
reacting to the idea that FPC almost didn’t include them because they "aren’t 
desirable".

> 
> But I would just do:
>  viewTransform := TMat4.Identity  * TMat4.Translate(x, y, 1) * 
> TMat4.Scale(scale, scale, 1);
> 
> why bother storing the intermediate results at all?

Maybe that was a bad example but I still like to break up lines. For anyone 
that knows, does the compiler have any fancy optimizations to not store the 
intermediate results?

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to