<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FIJReid%2FMathematics</id>
	<title>Module:Sandbox/IJReid/Mathematics - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FIJReid%2FMathematics"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/IJReid/Mathematics&amp;action=history"/>
	<updated>2026-05-07T09:25:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/IJReid/Mathematics&amp;diff=145543&amp;oldid=prev</id>
		<title>imported&gt;IJReid: mistake fixed</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/IJReid/Mathematics&amp;diff=145543&amp;oldid=prev"/>
		<updated>2017-10-22T20:22:43Z</updated>

		<summary type="html">&lt;p&gt;mistake fixed&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--Module to calculate basic math values&lt;br /&gt;
mathematics = {}&lt;br /&gt;
&lt;br /&gt;
mathematics.addition = function(input)				--Addition function&lt;br /&gt;
	local sum = 0									--Define variable for use in loop&lt;br /&gt;
	for i, arg in pairs(input.args) do				--Loop to run through all arguments&lt;br /&gt;
		sum = sum + arg								--Add argument value to sum&lt;br /&gt;
	end&lt;br /&gt;
	return sum										--Output the sum to the module&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
mathematics.subtraction = function(input)			--Subtraction function&lt;br /&gt;
	local dif = input.args[1] - input.args[2]		--Subtract second argument from first&lt;br /&gt;
	return dif										--Outpud difference to module&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
mathematics.multiplication = function(input)		--Multiplication function&lt;br /&gt;
	local product = 1								--Set product as 1 (so multiplication of it works)&lt;br /&gt;
	local pi = 3.141592653589793					--Set pi as 15 digits of precision&lt;br /&gt;
	for i, arg in pairs(input.args) do				--Allow multiple arguments&lt;br /&gt;
		if (arg == &amp;quot;pi&amp;quot; or arg == &amp;quot;π&amp;quot; or arg == 3.14) then	--Set pi to π argument&lt;br /&gt;
			arg = pi&lt;br /&gt;
		else&lt;br /&gt;
			product = product * arg					--Multiply arguments together&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return product									--Output product to module&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
mathematics.division = function(input)				--Division function&lt;br /&gt;
	local quotient = input.args[1] / input.args[2]	--Divide arg1 by arg2&lt;br /&gt;
	return quotient									--Output quotient to module&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return mathematics									--Output module to place of use&lt;/div&gt;</summary>
		<author><name>imported&gt;IJReid</name></author>
	</entry>
</feed>