最近真是發狠寫了一堆文啊...XD
正弦(sine)和餘弦(cosine)
是兩個遊戲邏輯常常用到的函式
然而它們的效能往往不佳
本文示範如何使用之前介紹的多項式近似技巧
實作比std::sin和std::cos快的版本
(在我的電腦上測試約是3.5倍快)
http://allenchou.net/2014/02/game-math-faster-sine-cosine/
[追加]
本技巧也可用來近似 1/sqrt(x)
用來快速re-normalize長度接近一的向量
http://allenchou.net/2014/02/game-math-fast-re-normalization-of-unit-vectors/
系列文目錄 http://allenchou.net/game-math-series/