MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / IsVecEqualToOne

Function IsVecEqualToOne

src/OpenColorIO/MathUtils.cpp:58–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57template<typename T>
58bool IsVecEqualToOne(const T * v, unsigned int size)
59{
60 static_assert(std::is_floating_point<T>::value,
61 "Only single and double precision floats are supported");
62
63 for(unsigned int i=0; i<size; ++i)
64 {
65 if(!IsScalarEqualToOne(v[i])) return false;
66 }
67 return true;
68}
69
70template bool IsVecEqualToOne(const float * v, unsigned int size);
71template bool IsVecEqualToOne(const double * v, unsigned int size);

Callers 3

saveFunction · 0.85
isIdentityMethod · 0.85
combineWithMethod · 0.85

Calls 1

IsScalarEqualToOneFunction · 0.85

Tested by

no test coverage detected