Scratching my head a bit...
View Single Post
05-23-2010, 05:19 PM
Join Date: Sep 2007
That seems like a good method.
Originally Posted by
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)
View Public Profile
Send a private message to Village Idiot
Find More Posts by Village Idiot