--[[
	
	Scales a ParticleEmitter. MAY not support all properties. Supports tuple of particles.
	
	Functions.ScaleParticle(
		particles,				<-- |REQ| 	ParticleEmitter that will be scaled
		scale,					<-- |REQ|	Scale (int) 			
	)
	
--]]




return function(_t, scale)
	--- Allow for array of particles
	if type(_t) ~= "table" then  _t = {_t}  end
	
	--- Iterate through particles
	for _, p in ipairs(_t) do
		--- Size
		local newKeypoints = {} 
		for _, keypoint in ipairs(p.Size.Keypoints) do
			table.insert(newKeypoints, NumberSequenceKeypoint.new(
				keypoint.Time, 
				keypoint.Value * scale, 
				keypoint.Envelope * scale
			))
		end
		p.Size = NumberSequence.new(newKeypoints)
		
		--- Drag
		p.Drag = p.Drag * scale
		
		--- Velocity
		p.VelocityInheritance = p.VelocityInheritance * scale
		
		--- Speed
		p.Speed = NumberRange.new(
			p.Speed.Min * scale, 
			p.Speed.Max * scale
		)
		
		--- Acceleration
		p.Acceleration = Vector3.new(
			p.Acceleration.X * scale, 
			p.Acceleration.Y * scale, 
			p.Acceleration.Z * scale
		)
	end
end
