public static boolean isValidVector(Vector2f vector){
  if (vector == null)   return false;
  if (Float.isNaN(vector.x) || Float.isNaN(vector.y))   return false;
  if (Float.isInfinite(vector.x) || Float.isInfinite(vector.y))   return false;
  return true;
}

public static boolean isValidVector ( Vector2f vector ) { if ( vector == null ) return false ; if ( Float . isNaN ( vector . x ) || Float . isNaN ( vector . y ) ) return false ; if ( Float . isInfinite ( vector . x ) || Float . isInfinite ( vector . y ) ) return false ; return true ; }
check a vector . . . if it is null or its floats are nan or infinite , return false . else return true .
