summaryrefslogtreecommitdiff
path: root/src/particleemitterprop.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/particleemitterprop.h')
-rw-r--r--src/particleemitterprop.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/particleemitterprop.h b/src/particleemitterprop.h
index 78f349b8..6a9d6ecb 100644
--- a/src/particleemitterprop.h
+++ b/src/particleemitterprop.h
@@ -37,17 +37,20 @@ enum ChangeFunc
template <typename T> struct ParticleEmitterProp
{
+ explicit ParticleEmitterProp(T value = T())
+ : ParticleEmitterProp(value, value)
+ {}
+
+ ParticleEmitterProp(T min, T max)
+ : minVal(min), maxVal(max)
+ {}
+
void set(T min, T max)
{
minVal = min;
maxVal = max;
}
- void set(T val)
- {
- set(val, val);
- }
-
void setFunction(ChangeFunc func, T amplitude, int period, int phase)
{
changeFunc = func;