Search Issue Tracker
Fixed in Unity 2017.1
Mathf.PingPong occasionally returns negative values
Steps to reproduce:
1. Open attached project "861278.zip"
2. Press play
3. Observe console output
Result: Mathf.PingPong(4676.5f, 1.99f) returns negative value
Expected result: Mathf.PingPong never returns value less than 0 as documented in https://docs.unity3d.com/ScriptReference/Mathf.PingPong.html
Negative values appear more often when 'value t' is bigger
Reproduced with: 5.3.1f1, 5.4.3p4, 5.5.0p1, 5.6.0b1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [LWRP] Terrain paint brush highlighter is missing when using the Light Weight Render Pipeline
- [Scripting/Particles] Gradient Scripting API thread checks have changed after bindings upgrade.
- Issue with reflection probe artifact staying after stopping gameview
- Unity freezes for a short time when prefab with animation is selected
- Input buffering and responsiveness issue for Linux Standalone builds with low framerate