Files
processing4/web/reference/API/log.xml
2005-01-27 06:48:42 +00:00

55 lines
891 B
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>log()</name>
<category>Math</category>
<subcategory>Calculation</subcategory>
<usage>Web &amp; Application</usage>
<example>
<image></image>
<code>
void setup() {
int i = 12;
println(log(i));
println(log10(i));
}
// Calculates the base-10 logarithm of a number
float log10 (int x) {
return (log(x) / log(10));
}
</code>
</example>
<description>
Calculates the natural logarithm (the base-<i>e</i> logarithm) of a number. This function expects the values greater than 0.0.
</description>
<syntax>
log(<c>value</c>)
</syntax>
<parameter>
<label>value</label>
<description>int or float: number must be greater then 0.0</description>
</parameter>
<returns>float</returns>
<related>
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
<level>Extended</level>
</root>