public static void checkFloatNotNaNOrInfinity ( String parameterName , float data ) { if ( Float . isNaN ( data ) || Float . isInfinite ( data ) ) { throw Exceptions . IllegalArgument ( "%s should never be NaN or Infinite." , parameterName ) ; } }
In common shader cases NaN makes little sense . Correspondingly GVRF is going to use Float . NaN as illegal flag in many cases . Therefore we need a function to check if there is any setX that is using NaN as input .