Skip to content

Commit

Permalink
Add notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 27, 2023
1 parent 8e043bf commit 0738315
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/Sandbox/templates/DecimalExamples/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@
}

echo $this->Highlighter->highlight(print_r($result, true), ['lang' => 'php']);
} else {
echo '<p>';
echo '---';
echo '</p>';
} ?>

<p>Some notes:</p>
<ul>
<li>multiply() by default adds the scales of each number.</li>
<li>
divide() requires a 2nd param scale, and right now the demo defaults to the max scale of the two numbers.
<br>
So <code>1</code> and <code>2</code> result in <code>0</code> as the scale of that result cuts of the decimal values.
</li>
</ul>

</div>

0 comments on commit 0738315

Please sign in to comment.