<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[The Absolution Value Operator]]></title><description><![CDATA[<h2><a class="anchor-offset" name="introduction"></a>Introduction</h2>
<p dir="auto">When a number is greater than 0, such as 3.5, we say it is a “positive” number; when a number is less than 0, such as -2.1, we say it is a “negative” number.</p>
<p dir="auto">We can convert a negative number to a positive number using the “abs” operator.</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/78532a6f-951a-4388-b78a-567872b876c7.gif" alt="r8.gif" class=" img-responsive img-markdown" width="313" height="188" /></p>
<p dir="auto"> <br />
If the input number is already a positive number, then the output number is the same as the input:</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f5630d33-c311-4a75-ab50-75268b3cf453.gif" alt="r9.gif" class=" img-responsive img-markdown" width="313" height="188" /></p>
<p dir="auto"> <br />
 </p>
<h2><a class="anchor-offset" name="example"></a>Example</h2>
<p dir="auto">Suppose a sprite is at the x position of -25, and we want to know its horizontal distance from the center of the stage. We can simply calculate it using abs(-25), which gives us 25.</p>
]]></description><link>https://forum.creaticode.com/topic/853/the-absolution-value-operator</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 01:10:08 GMT</lastBuildDate><atom:link href="https://forum.creaticode.com/topic/853.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 05 Mar 2023 00:32:10 GMT</pubDate><ttl>60</ttl></channel></rss>