查看: 1625|回复: 2
打印 上一主题 下一主题

[其他] 向量规范化(转载)

[复制链接]

2317

主题

54

听众

2万

积分

资深设计师

Rank: 7Rank: 7Rank: 7

纳金币
20645
精华
62

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2014-7-26 17:33:27 |只看该作者 |倒序浏览

var normalized : Vector3
Description描述
Returns this vector with a magnitude of 1 (Read Only).
返回向量的长度为1(只读)。
When normalized, a vector keeps the same direction but its length is 1.0.
当规格化后,向量保持同样的方向,但是长度变为1.0。
Note that the current vector is unchanged and a new normalized vector is returned. If you want to normalize the current vector, useNormalize function.
注意,当前向量是不改变的并且返回一个新的规范化的向量。如果你想规范化当前向量,使用Normalize函数。
If the vector is too small to be normalized a zero vector will be returned.
如果这个向量太小而不能被规范化,一个零向量将会被返回。
/****************************************************************************************************************8/
function Normalize () : void
Description描述
Makes this vector have a magnitude of 1.
使向量的长度为1。
When normalized, a vector keeps the same direction but its length is 1.0.
当规范化的,一个向量保持相同的方向,但它的长度为1.0。
Note that this function will change the current vector. If you want to keep the current vector unchanged, use normalized variable.
注意,这个函数将改变当前向量,如果你想保持当前的向量不改变,使用normalized变量。
If this vector is too small to be normalized it will be set to zero.
如果这个向量太小而不能被规范化,一个零向量将会被返回。
参见: normalized 变量

分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

hyui    

1

主题

2

听众

6671

积分

高级设计师

Rank: 6Rank: 6

纳金币
2715
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2014-7-26 19:12:41 |只看该作者
Thanks for sharing your knowledge !
回复

使用道具 举报

1

主题

1

听众

133

积分

设计实习生

Rank: 2

纳金币
50
精华
0

最佳新人

板凳
发表于 2014-7-28 09:37:39 |只看该作者
不错, 多谢分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-7-20 03:39 , Processed in 0.072928 second(s), 32 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部