Hi All, I have a slightly off-topic maths question based on the following of my Delphi legacy code. var max_x, max_y, max_loop : integer;begin max_x := 35; max_y := 90; max_loop := trunc( max_x * max_y / 1.575 ); // gives 2000 for 35 x 90[...] Is 1.575 represented as a fraction? It does not seem to be. It (for what it's worth) is the square_root( 2.480625 )... but it does not seem to have any relevance. What is the significance of the magic number. Max_x and Max_y are the dimensions of a 2D array and max_loop is the target population which I will filling the array with. This code goes back to year 2000 and I have no idea where the number 1.575 comes from... but it seems to work as the comment suggests. E.g. the max_loop assignment in that example gives 2000. Any ideas as to the meaning of the constant? And can this be simplified? I don't think so. NB - No correlation between max_loop and year 2000... just a coincidence :-) Best Regards,PEW
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
