hogeはdouble型で
int temp = int(hoge);
if (temp > 0)
return temp;
else
return 0;

このような処理をしたいのですが、何か良さげな内部関数とかないですかね