mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-23 10:20:24 +01:00
12 lines
237 B
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]));
|
|
}
|