コード例 #1
0
ファイル: vec3.go プロジェクト: RookieGameDevs/surviveler
// Vec3Min selects the minimum value of each element from the specified vectors.
//
//     mn  [in,out] A vector, will be updated with the result.
//     v   [in]     A vector.
func Vec3Min(mn, v Vec3) {
	mn[0] = math32.Min(mn[0], v[0])
	mn[1] = math32.Min(mn[1], v[1])
	mn[2] = math32.Min(mn[2], v[2])
}
コード例 #2
0
ファイル: vec2.go プロジェクト: RookieGameDevs/surviveler
// Vec2Min selects the minimum value of each element from the specified vectors.
//
//     mn  [in,out] A vector, will be updated with the result.
//     v   [in]     A vector.
func Vec2Min(mn, v Vec2) {
	mn[0] = math32.Min(mn[0], v[0])
	mn[1] = math32.Min(mn[1], v[1])
}