Skip to content

Commit 19d48b3

Browse files
committed
Add basic example for pow()
Previously, the reference page only provided a link to an overly complex example sketch.
1 parent 0a26818 commit 19d48b3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Language/Functions/Math/pow.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ The result of the exponentiation. (`double`)
4747
[float]
4848
=== Example Code
4949
// Describe what the example code is all about and add relevant code ►►►►► THIS SECTION IS MANDATORY ◄◄◄◄◄
50-
See the (http://arduino.cc/playground/Main/Fscale[fscale]) function in the code library.
50+
Calculate the value of x raised to the power of y:
51+
[source,arduino]
52+
----
53+
z = pow(x, y);
54+
----
55+
See the (http://arduino.cc/playground/Main/Fscale[fscale]) sketch for a more complex example of the use of `map()`.
56+
[%hardbreaks]
5157

5258
--
5359
// HOW TO USE SECTION ENDS

0 commit comments

Comments
 (0)