ベクトルで表現された2点間の距離を計算します。
点の座標は、原点からその点まで伸びるベクトルの成分で表現できます。
dist()の静的バージョンであるp5.Vector.dist(v1, v2)は、 v1.dist(v2)を呼び出すのと同じです。
dist(x1, y1, x2, y2)のように座標を使用して点間の距離を計算するには、 dist()を使用してください。
実例
シンタックス
  
      dist(v)
      
        
  
      dist(v1, v2)
      
        リターン
Number: 距離。
Notice any errors or typos? Please let us know. Please feel free to edit src/math/p5.Vector.js and open a pull request!