function SliderClass.Get(R)local k=R._Spring.x if R.Inverted then k=1-k end return k end function SliderClass.Set(t,R,k)local u=t._Spring local n=math.clamp(R,0,1)if t.Interval>0 then n=math.floor(n/t.Interval+.5)*t.Interval end u.t=n u.instant=not k end function SliderClass.Destroy(R)R._Maid:Sweep()R.Frame:Destroy()R.Changed=nil R.Clicked=nil R.StartDrag=nil R.StopDrag=nil R.Frame=nil end


function SliderClass:Get()
	local t = self._Spring.x
	if (self.Inverted) then t = 1 - t end
	return t
end

function SliderClass:Set(value, doTween)
	local spring = self._Spring
	local newT = math.clamp(value, 0, 1)
	
	if (self.Interval > 0) then
		newT = math.floor((newT / self.Interval) + 0.5) * self.Interval
	end
	
	spring.t = newT
	spring.instant = not doTween
end

function SliderClass:Destroy()
	self._Maid:Sweep()
	self.Frame:Destroy()
	self.Changed = nil
	self.Clicked = nil
	self.StartDrag = nil
	self.StopDrag = nil
	self.Frame = nil
end
