document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("6\n");
document.write("7\n");
document.write("8\n");
document.write("9\n");
document.write("10\n");
document.write("11\n");
document.write("12\n");
document.write("13\n");
document.write("14\n");
document.write("15\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\">\n");
document.write("<span class=\'keyword keyword_control keyword_control_actionscript\'>private<\/span> <span class=\'meta meta_function meta_function_actionscript\'><span class=\'storage storage_type storage_type_function storage_type_function_asp\'>function<\/span> <span class=\'entity entity_name entity_name_function entity_name_function_asp\'>randomRange<\/span>(<span class=\'variable variable_parameter variable_parameter_function variable_parameter_function_asp\'>minNum:Number<\/span>,<span class=\'variable variable_parameter variable_parameter_function variable_parameter_function_asp\'> maxNum:Number<\/span>)<\/span><span class=\'keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript\'>:<\/span><span class=\'storage storage_type storage_type_actionscript\'>Number<\/span> {\n");
document.write("	<span class=\'keyword keyword_control keyword_control_actionscript\'>return<\/span> (<span class=\'support support_class support_class_actionscript\'>Math<\/span>.<span class=\'support support_function support_function_actionscript\'>floor<\/span>(<span class=\'support support_class support_class_actionscript\'>Math<\/span>.<span class=\'support support_function support_function_actionscript\'>random<\/span>() <span class=\'keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript\'>*<\/span> (maxNum <span class=\'keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript\'>-<\/span> minNum <span class=\'keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript\'>+<\/span> <span class=\'constant constant_numeric constant_numeric_actionscript\'>1<\/span>)) <span class=\'keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript\'>+<\/span> minNum);\n");
document.write("}\n");
document.write("\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//Beispiele:<\/span>\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//var foo:Number = randomRange(0, 10); füllt foo mit einer Zahl zwischen 0 und 10<\/span>\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//var foo:Number = randomRange(0.3, 10.8); füllt foo mit Zahl zwischen 1 und 10<\/span>\n");
document.write("\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//Erklärung:<\/span>\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//math.floor rundet jede Fließkommazahl ab.<\/span>\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//(maxNum - minNum + 1): die Distanz wird definiert, die benutzt werden darf <\/span>\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//(+1 wegen Math.floor, damit z.B. 0,3 (minNum) zu 1.3 wird und floor es zu 1 macht)<\/span>\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//Math random() * ... sorgt dafür, dass wir einen Bruchteil unserer Distanz erhalten<\/span>\n");
document.write("<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_actionscript\'>//+minNum sorgt dafür, dass unser Wert ganz sicher über dem Minimalwert liegt.<\/span>\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/423150.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/423150\">Pastie #423150<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");
