3 ms·
You must be a fucking genius then because: Vec w=nl, u=((fabs(w.x)>.1?Vec(0,1):Vec(1))%w).norm(), v=w%u; is completely unreadable and that's just one line.
by btmorex 10y ago
You must be a fucking genius then because:
Vec w=nl, u=((fabs(w.x)>.1?Vec(0,1):Vec(1))%w).norm(), v=w%u;
is completely unreadable and that's just one line.
- jackmott 10y agonot that bad.
- TillE 10y agoThat really just needs some whitespace. Vec w=nl, u=((fabs(w.x) > .1 ? Vec(0,1) : Vec(1)) % w).norm(), v=w%u; Simple, right? I can see how it would look like garbage if you miss the three separate variables being initialized, but that should be familiar to most people with C/C++ experience.
- strainer 10y ago% being overloaded as vector cross product is a bit mysterious here (until investigating Vec's definition) It might be helpful if the instantiations were written fully too, ie. Vec(0,1,0) : Vec(1,0,0)
- strainer 10y agoNo its fine and Im certainly no genius. I just dont need whitespace to 'reinforce' code expression - its a visual familiarity thing, quite a general reading skill. The only confusing thing in this line is the % operator being overloaded on Vecs to mean the cross product. What the calculation is actually for is what takes time to grok, but you cant expect that to be revealed by familiar formatting and expansive variable names.