SPARK icon indicating copy to clipboard operation
SPARK copied to clipboard

SpawnParticlesAction::setNb possible mistake

Open caxapexac opened this issue 2 years ago • 0 comments

	void SpawnParticlesAction::setNb(unsigned int min,unsigned int max)
	{
		if (min <= max)
		{
			this->minNb = minNb;
			this->maxNb = maxNb;
		}
		else
		{
			SPK_LOG_WARNING("SpawnParticlesAction::setNb(unsigned int,unsigned int) - min is higher than max - Values are swapped");
			this->minNb = maxNb;
			this->maxNb = minNb;
		}
	}

Seems like it should be

	void SpawnParticlesAction::setNb(unsigned int min,unsigned int max)
	{
		if (min <= max)
		{
			this->minNb = min;
			this->maxNb = max;
		}
		else
		{
			SPK_LOG_WARNING("SpawnParticlesAction::setNb(unsigned int,unsigned int) - min is higher than max - Values are swapped");
			this->minNb = max;
			this->maxNb = min;
		}
	}

caxapexac avatar Sep 11 '22 10:09 caxapexac