提交 5f2187fb 编写于 作者: T Tristan VALCKE

Improve Vector2 closure performance

上级 d5b9bc68
......@@ -269,17 +269,11 @@ Object.assign( Vector2.prototype, {
clampScalar: function () {
var min, max;
var min = new Vector2();
var max = new Vector2();
return function clampScalar( minVal, maxVal ) {
if ( min === undefined ) {
min = new Vector2();
max = new Vector2();
}
min.set( minVal, minVal );
max.set( maxVal, maxVal );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册