Bazaar developer reference

citystrategyround(double)

Defined in
CvCityStrategyAI.cpp, line 617
Hook name
CivHooks::CvCityStrategyAI_cpp_citystrategyround

Hooks

static bool BeforeCvCityStrategyAI_cpp_citystrategyround(double x, double& result);static void AfterCvCityStrategyAI_cpp_citystrategyround(double x, double& result);static double ReplaceCvCityStrategyAI_cpp_citystrategyround(double (*original)(double), double x);CivRegisterBefore<CivHooks::CvCityStrategyAI_cpp_citystrategyround>(host, &BeforeCvCityStrategyAI_cpp_citystrategyround);CivRegisterAfter<CivHooks::CvCityStrategyAI_cpp_citystrategyround>(host, &AfterCvCityStrategyAI_cpp_citystrategyround);CivRegisterReplace<CivHooks::CvCityStrategyAI_cpp_citystrategyround>(host, &ReplaceCvCityStrategyAI_cpp_citystrategyround);

Code

616//Helper functions to round617static double citystrategyround(double x)618{619	return (x >= 0) ? floor(x + .5) : ceil(x - .5);620}

Calls

Called by