10 #ifndef MI_MATH_SPECTRUM_H
11 #define MI_MATH_SPECTRUM_H
93 #if defined(DEBUG) || (defined(_MSC_VER) && _MSC_VER <= 1310)
101 Float32 v = (Traits::has_signaling_NaN)
179 Spectrum_struct::operator=( s);
236 return (lhs[0] == rhs[0]) && (lhs[1] == rhs[1]) && (lhs[2] == rhs[2]);
242 return (lhs[0] != rhs[0]) || (lhs[1] != rhs[1]) || (lhs[2] != rhs[2]);
250 if( lhs[0] != rhs[0])
251 return lhs[0] < rhs[0];
252 if( lhs[1] != rhs[1])
253 return lhs[1] < rhs[1];
254 return lhs[2] < rhs[2];
262 return ! (rhs < lhs);
278 return ! (lhs < rhs);
334 return Spectrum( lhs[0] + rhs[0], lhs[1] + rhs[1], lhs[2] + rhs[2]);
342 return Spectrum( lhs[0] - rhs[0], lhs[1] - rhs[1], lhs[2] - rhs[2]);
350 return Spectrum( lhs[0] * rhs[0], lhs[1] * rhs[1], lhs[2] * rhs[2]);
358 return Spectrum( lhs[0] / rhs[0], lhs[1] / rhs[1], lhs[2] / rhs[2]);
365 return Spectrum( -c[0], -c[1], -c[2]);
398 return Spectrum( c[0] * s, c[1] * s, c[2] * s);
405 return Spectrum( s * c[0], s * c[1], s* c[2]);
413 return Spectrum( c[0] * f, c[1] * f, c[2] * f);
438 return (c[0] != 0.0f) && (c[1] != 0.0f) && (c[2] != 0.0f);
445 return (c[0] != 0.0f) || (c[1] != 0.0f) || (c[2] != 0.0f);
486 clamp( c[1], low[1], high[1]),
487 clamp( c[2], low[2], high[2]));
496 clamp( c[1], low[1], high),
497 clamp( c[2], low[2], high));
506 clamp( c[1], low, high[1]),
507 clamp( c[2], low, high[2]));
515 clamp( c[1], low, high),
516 clamp( c[2], low, high));
646 lerp( c1[1], c2[1], t[1]),
647 lerp( c1[2], c2[2], t[2]));
661 lerp( c1[1], c2[1], t),
662 lerp( c1[2], c2[2], t));
764 sincos( a[0], s[0], c[0]);
765 sincos( a[1], s[1], c[1]);
766 sincos( a[2], s[2], c[2]);
881 #endif // MI_MATH_SPECTRUM_H