if cube data isn't initialised, just initialise it, don't whine.
using tan(double) instead of tanf(float). fixes the build on linux