sizeof(x) = number of bytes in x.
sizeof(float) = 4.
sizeof(array) = number of bytes in all elements in the array.

float array[10];
sizeof(array) / sizeof(float) = sizeof(10 floats) / sizeof(1 float)
= 10

Simple, I have used this many times before.
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to