p5.Vectorオブジェクトのコンポーネントを スケーリングして、その大きさを1にします。
normalize()の静的バージョン、つまりp5.Vector.normalize(v)は、 新しいp5.Vectorオブジェクトを返し、 元のオブジェクトは変更しません。
実例
シンタックス
normalize()
normalize(v, [target])
パラメーター
v
p5.Vector:
正規化するベクトル
target
p5.Vector:
結果を受け取るベクトル
リターン
p5.Vector: 正規化されたp5.Vector。
This page is generated from the comments in src/math/p5.Vector.js . Please feel free to edit it and submit a pull request!