您的位置:首页 > 移动开发 > Unity3D

Vector方法magnitude

2015-11-16 16:13 393 查看
转载自:

var magnitude : float

Description描述

Returns the length of this vector (Read Only).

返回向量的长度(只读)。

The length of the vector is square root of (x*x+y*y).

向量的长度是(x*x+y*y)的平方根。

If you only need to compare magnitudes of some vectors, you can compare squared magnitudes of them using sqrMagnitude (computing squared magnitudes is faster).

如果你只需要比较一些向量的长度,你可以比较它们长度的平方,使用sqrMagnitude(计算平方更快)。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  unity3d