提交 2e53761e 编写于 作者: M Mr.doob

Merge branch 'dev' of https://github.com/mrdoob/three.js into dev

......@@ -103,6 +103,12 @@
Computes length of this vector.
</div>
<h3>[method:Float lengthManhattan]()</h3>
<div>
Computes Manhattan length of this vector.<br />
[link:http://en.wikipedia.org/wiki/Taxicab_geometry]
</div>
<h3>[method:Vector2 normalize]() [page:Vector2 this]</h3>
<div>
Normalizes this vector.
......
......@@ -337,6 +337,11 @@ THREE.Vector2.prototype = {
},
lengthManhattan: function() {
return Math.abs( this.x ) + Math.abs( this.y );
},
normalize: function () {
return this.divideScalar( this.length() );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册