2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-23 02:16:01 +01:00
waf/playground/go/other/a.go

12 lines
237 B
Go

// By: Tom Wambold <tom5760@gmail.com>
package other
import "math"
// A three-value vector (i, j, k)
type Vector3 [3]float64
func (a *Vector3) Size() float64 {
return math.Sqrt(float64(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]));
}