加载lua脚本方法

This commit is contained in:
flswld committed 2023-03-01 10:50:59 +08:00
1 parent 0395dc0bc2
commit a7b3f41839
8 files changed
+239 -73

No files matched your search

-7
View File
@@ -1,14 +1,7 @@
package model
import "math"
type Vector struct {
X float64
Y float64
Z float64
}
// Distance 两坐标之间的距离
func (v *Vector) Distance(vector *Vector) float64 {
return math.Sqrt(math.Pow(v.X-vector.X, 2) + math.Pow(v.Y-vector.Y, 2) + math.Pow(v.Z-vector.Z, 2))
}