function SliderClass.Get(g)local V=g._Spring.x if g.Inverted then V=1-V end return V end function SliderClass.Set(j,g,V)local O=j._Spring local f=math.clamp(g,0,1)if j.Interval>0 then f=math.floor(f/j.Interval+.5)*j.Interval end O.t=f O.instant=not V end function SliderClass.Destroy(g)g._Maid:Sweep()g.Frame:Destroy()g.Changed=nil g.Clicked=nil g.StartDrag=nil g.StopDrag=nil g.Frame=nil end
-- Public Methods

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
