MCPcopy Create free account
hub / github.com/SimHacker/micropolis / getDemands

Method getDemands

MicropolisCore/src/MicropolisEngine/src/utilities.cpp:416–424  ·  view source on GitHub ↗

* Return the residential, commercial and industrial * development demands, as floating point numbers * from -1 (lowest demand) to 1 (highest demand). */

Source from the content-addressed store, hash-verified

414 * from -1 (lowest demand) to 1 (highest demand).
415 */
416void Micropolis::getDemands(
417 float *resDemandResult,
418 float *comDemandResult,
419 float *indDemandResult)
420{
421 *resDemandResult = (float)resValve / (float)RES_VALVE_RANGE;
422 *comDemandResult = (float)comValve / (float)COM_VALVE_RANGE;
423 *indDemandResult = (float)indValve / (float)IND_VALVE_RANGE;
424}
425
426
427////////////////////////////////////////////////////////////////////////

Callers 2

handle_updateMethod · 0.80
drawContentMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected