Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor qMath.MapNumber and qMath.LerpNumber to qMath.Map and qMath.Lerp, respectively #80

Open
Quenty opened this issue Jan 5, 2018 · 1 comment

Comments

@Quenty
Copy link
Owner

Quenty commented Jan 5, 2018

No description provided.

@Quenty Quenty changed the title Refactor MapNumber and LerpNumber to Map and Lerp, respectively Refactor qMath.MapNumber and qMath.LerpNumber to qMath.Map and qMath.Lerp, respectively Jan 5, 2018
@Validark
Copy link
Contributor

function Math.CompoundTransparency(a, b)
	-- For when you need something to have a Transparency of a Transparency.
	-- For example, a Ripple whose "Color" is Black with 0.46 Transparency (for gray)
	--	that would, if it were any other color, have 0.8 or 0.9 Transparency
	-- @param number a
	-- @param number b

	return a + b - a*b
end

function Math.Lerp(Start, Finish, Alpha)
	-- Return intermediate value between Start and Finish
	-- @param number Start
	-- @param number Finish
	-- @param number Alpha [0, 1]

	return Start + Alpha * (Finish - Start)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants