<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Comments for page &quot;Make a Variable Negative in PlayBasic&quot;</title>
		<link>http://gamedesign.wikidot.com/forum/t-10633/make-a-variable-negative-in-playbasic</link>
		<description>Posts in the discussion thread &quot;Make a Variable Negative in PlayBasic&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Mon, 17 Aug 2026 23:13:05 +0000</lastBuildDate>
		
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-10633#post-26359</guid>
				<title>(no title)</title>
				<link>http://gamedesign.wikidot.com/forum/t-10633/make-a-variable-negative-in-playbasic#post-26359</link>
				<description></description>
				<pubDate>Wed, 30 May 2007 17:20:51 +0000</pubDate>
				<wikidot:authorName>hartnell</wikidot:authorName>				<wikidot:authorUserId>10978</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>You're right. I'll add it today. :) &#8212;hartnell</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-10633#post-26245</guid>
				<title>There is a faster way to netage a value</title>
				<link>http://gamedesign.wikidot.com/forum/t-10633/make-a-variable-negative-in-playbasic#post-26245</link>
				<description></description>
				<pubDate>Wed, 30 May 2007 09:10:49 +0000</pubDate>
				<wikidot:authorName>u9</wikidot:authorName>				<wikidot:authorUserId>12755</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Unless you specifically need to know, there is no reason to actually check the sign (positive/negative) of the variable. Negating a variable can simply be done by making it positive with <tt>Abs()</tt> and then negating it with <tt>Neg()</tt> like so:</p> <div class="code"> <pre><code> someVar = Neg( Abs( someVar ) )</code></pre></div> <p>This works because any value returned by <tt>Abs()</tt> will always be positive, so negating that will <strong>always</strong> be a negative number.</p> <p>This method also executes faster.</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>