ベクトルの大きさ(長さ)を計算します。
2Dベクトルの大きさを計算するには、mag()を使用し、 mag(x, y)のようにコンポーネントを指定します。
実例
シンタックス
mag()
mag(vecT)
パラメーター
vecT
p5.Vector:
大きさを返すベクトル
リターン
Number: ベクトルの大きさ。
This page is generated from the comments in src/math/p5.Vector.js . Please feel free to edit it and submit a pull request!