sam hocevar
Reputation
18,208
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
 Oct 2 awarded Nice Answer Oct 1 answered SDL_LoadBMP into glTexImage2D results in scewed colors Sep 4 comment What happens if I make more than \$100k with the free Unity license? I'm voting to close this question as off-topic because you’d better ask a Unity salesperson directly. Jul 24 comment How do I lerp between values that loop (such as hue or rotation)? @GustavoMaciel having checked the code again, it’s actually extremely safe and works exactly as it should even in the corner case you describe. Jul 24 comment How do I lerp between values that loop (such as hue or rotation)? @GustavoMaciel that’s not “most cases”, that’s one very specific corner case that just never happens in practice. Also, there is no division by zero, check the code. Jul 20 comment Why is the drag force multiplied by the inverse normalised velocity vector? But you can’t do it component-wise; this is only valid for linear operations, and the `v²` in the drag formula makes it non-linear. Just compare the results you get with `v` = `[1 0 0]` and with `[0.8 0.6 0]`. Both these vector have unit length, but your method will give you 30% less drag with the second vector. Jul 18 answered Why is the drag force multiplied by the inverse normalised velocity vector? Jul 15 awarded Nice Answer Jul 15 awarded Enlightened Jul 15 awarded Nice Answer Jul 9 answered Why do we need a fourth coordinate to divide by z? Jul 7 comment Correct way to integrate scaled axis angular velocity into a quaternion “Both approaches produce a rotation” really? The second method does not produce a unit quaternion in general, but since you say it’s from a reputable source there must be a lot of missing information in your question. Jun 15 comment Transform Matrix multiplication order The confusion comes from the fact that you are talking about local transformations (where the frame remains linked to the object), whereas the transformations described here happen in world space (where there is only one fixed reference frame, the world). Conceptually, your way of seeing things is valid, and it is equivalent to applying transformations in reverse order. Jun 10 awarded Nice Answer May 24 answered How to calculate normal vector of a curve? May 16 comment Finding which tiles are intersected by a line, without looping through all of them or skipping any possible duplicate of How do I generalise Bresenham's line algorithm to floating-point endpoints? (the question isn’t actually about Bresenham) May 10 answered What is an efficient packing algorithm for packing rectangles into a polygon? May 5 comment Algorithm that always returns the same pseudorandom output if given the same input of seed, x and y? I have posted the code. Maybe refresh the page? But, anyway, your stubbornness is hopeless and your objections indicate that there are too many things you don’t understand and you should either read about them or trust the people who do. If after so much information has been given to you, you still “don't need to measure”, well you’re just not the kind of person I want to help; hopefully my answer can still be useful to someone else. Have fun! May 5 revised Algorithm that always returns the same pseudorandom output if given the same input of seed, x and y? add murmurhash speed comparison May 5 comment Algorithm that always returns the same pseudorandom output if given the same input of seed, x and y? @NovaCrist Gee, that C++ code is 5 times faster than MurmurHash3. I’m pretty sure you actually didn’t measure anything.