Imported Upstream version 3.1.9
[platform/upstream/Imath.git] / docs / examples / Color3.cpp
1 #include <Imath/ImathColor.h>
2 #include <cassert>
3
4 void
5 color3_example()
6 {
7     Imath::C3c   r (255, 0, 0);
8     Imath::C3c   g (0, 255, 0);
9     Imath::C3c   b (0, 0, 255);
10     
11     Imath::C3c   c = r + g + b;
12
13     assert (c.x == 255);
14     assert (c.x == 255);
15     assert (c.x == 255);
16 }