Scratching my head a bit...
View Single Post
05-23-2010, 06:21 AM
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Ok... it's to work out how many stairs are required for a staircase...
x = Height of floor
y and z are the min and max rise allowed per stair at a given angle (UK Building Regulations)
so (a) has got to be a whole number as thats the quantity of stairs, but this is not known until it's calculated by iterating though a loop to find out what value fits...
so the way I see it I need to do something like
$a = 1
while x / $a > y
$a = 50
while x / $a < z
Something on those lines (Obviously have simplified it for easier reading)
That should give me the max and min quantity of steps in the staircase... So need to round (a) to the nearest whole number and do a quick..
(x) / (a) to give me the exact rise of step which will be between (y) and (z)
Sex, Drugs & Linux Rules
View Public Profile
Send a private message to maeltar
Find More Posts by maeltar