3 ms·
I know in some situations you can use dot product and it's an optimization I will apply. A bit more care must be taken though. The input must be unit vectors an
by mortoray 12y ago
I know in some situations you can use dot product and it's an optimization I will apply. A bit more care must be taken though. The input must be unit vectors and the output can be positive or negative.
I tend to do my first code as logically clean and then apply optimizations later. This will likely be replaced by an `IsCusp` function instead, to make it even clearer, and provide a clean place to do the optimization.
- Sharlin 12y agoOh, indeed. I'm a bit embarrassed I didn't consider the need for normalization and the potential negative output :P