Closed ghost closed 5 years ago
In testing this made the feedForward() method go from taking up 10% of the total time to 7% Here's a jsperf test showing a comparison Here's a graph showing the difference between the 2 functions Numbers bigger than +/-3 are clamped to +/-1
Looks good, I had something similar before but I tested it on JSPerf and it was slower so I reverted to the built-in function.
In testing this made the feedForward() method go from taking up 10% of the total time to 7% Here's a jsperf test showing a comparison Here's a graph showing the difference between the 2 functions Numbers bigger than +/-3 are clamped to +/-1