function Expectation.near(J,T,Y)assert(type(J.value)=="\110\117\109\098\101\114","\069\120\112\101\099\116\097\116\105\111\110 \118\097\108\117\101 \109\117\115\116 \098\101 \097 \110\117\109\098\101\114 \116\111 \117\115\101 \'\110\101\097\114\'")assert(type(T)=="\110\117\109\098\101\114","\111\116\104\101\114\086\097\108\117\101 \109\117\115\116 \098\101 \097 \110\117\109\098\101\114")assert(type(Y)=="\110\117\109\098\101\114"or Y==nil,"\108\105\109\105\116 \109\117\115\116 \098\101 \097 \110\117\109\098\101\114 \111\114 \110\105\108")Y=Y or 1e-07 local I=(math.abs(J.value-T)<=Y)==J.successCondition local G=formatMessage(J.successCondition,("\069\120\112\101\099\116\101\100 \118\097\108\117\101 \116\111 \098\101 \110\101\097\114 \037\102 \040\119\105\116\104\105\110 \037\102\041 \098\117\116 \103\111\116 \037\102 \105\110\115\116\101\097\100"):format(T,Y,J.value),("\069\120\112\101\099\116\101\100 \118\097\108\117\101 \116\111 \110\111\116 \098\101 \110\101\097\114 \037\102 \040\119\105\116\104\105\110 \037\102\041 \098\117\116 \103\111\116 \037\102 \105\110\115\116\101\097\100"):format(T,Y,J.value))assertLevel(I,G,3)J:_resetModifiers()return J end

function Expectation:near(otherValue, limit)
	assert(type(self.value) == "number", "Expectation value must be a number to use 'near'")
	assert(type(otherValue) == "number", "otherValue must be a number")
	assert(type(limit) == "number" or limit == nil, "limit must be a number or nil")

	limit = limit or 1e-7

	local result = (math.abs(self.value - otherValue) <= limit) == self.successCondition

	local message = formatMessage(self.successCondition,
		("Expected value to be near %f (within %f) but got %f instead"):format(
			otherValue,
			limit,
			self.value
		),
		("Expected value to not be near %f (within %f) but got %f instead"):format(
			otherValue,
			limit,
			self.value
		)
	)

	assertLevel(result, message, 3)
	self:_resetModifiers()

	return self
end
