MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/Imath / Vec4Array_max

Function Vec4Array_max

src/python/PyImath/PyImathVec4ArrayImpl.h:86–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85template <class T>
86static IMATH_NAMESPACE::Vec4<T>
87Vec4Array_max(const FixedArray<IMATH_NAMESPACE::Vec4<T> > &a)
88{
89 Vec4<T> tmp(Vec4<T>(0));
90 size_t len = a.len();
91 if (len > 0)
92 tmp = a[0];
93 for (size_t i=1; i < len; ++i)
94 {
95 if (a[i].x > tmp.x)
96 tmp.x = a[i].x;
97 if (a[i].y > tmp.y)
98 tmp.y = a[i].y;
99 if (a[i].z > tmp.z)
100 tmp.z = a[i].z;
101 if (a[i].w > tmp.w)
102 tmp.w = a[i].w;
103 }
104 return tmp;
105}
106
107
108// Trick to register methods for float-only-based vectors

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected