<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: random generation of a '-1' or '1' flag? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38230#M40198</link>
    <description>thanks guys!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
~/archiben</description>
    <pubDate>Fri, 15 Oct 2004 13:35:33 GMT</pubDate>
    <dc:creator>__archiben</dc:creator>
    <dc:date>2004-10-15T13:35:33Z</dc:date>
    <item>
      <title>random generation of a '-1' or '1' flag?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38227#M40195</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;as a GDL newbie, (i'm slowly getting through the first section DNC's cookbook), i'm a little lost with this:&lt;BR /&gt;
&lt;BR /&gt;
is there any way i can create a random '-1' or '1' flag for a random positive/negative ADD and ROT command?&lt;BR /&gt;
&lt;BR /&gt;
i can generate the random amount i want to offset/rotate, but i want to multiple by the -1 or 1 as well for a truer randomisation.&lt;BR /&gt;
&lt;BR /&gt;
hoping . . . &lt;BR /&gt;
~/archiben&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Oct 2004 09:33:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38227#M40195</guid>
      <dc:creator>__archiben</dc:creator>
      <dc:date>2004-10-13T09:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: random generation of a '-1' or '1' flag?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38228#M40196</link>
      <description>You can use the RND function for this.&lt;BR /&gt;
Page 2.40 of the Cookbook look also at the chapter Maths bits.&lt;BR /&gt;
Not sure if it is exactly what you are asking for, but may be this can help.</description>
      <pubDate>Wed, 13 Oct 2004 09:56:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38228#M40196</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-13T09:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: random generation of a '-1' or '1' flag?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38229#M40197</link>
      <description>Ben;&lt;BR /&gt;
&lt;BR /&gt;
Try playing with the below...&lt;BR /&gt;
&lt;BR /&gt;
HTH - Stuart&lt;BR /&gt;
_____________________________&lt;BR /&gt;
&lt;BR /&gt;
!*** Ben's Random Flag v1.0 ***&lt;BR /&gt;
&lt;BR /&gt;
oRandom = rnd(0.9999999)&lt;BR /&gt;
if oRandom &amp;gt; 0.5 then oFlag = +1 else oFlag = -1&lt;BR /&gt;
text2 0,0, oFlag&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!*** Ben's Random Flag v2.0 ***&lt;BR /&gt;
&lt;BR /&gt;
oFlag = 2*(int(rnd(1.99999)))-1&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!*** Ben's Random Angle v1.0 ***&lt;BR /&gt;
&lt;BR /&gt;
oMinimumAngle = -90&lt;BR /&gt;
oMaximumAngle = +90&lt;BR /&gt;
oRotation = rnd (oMaximumAngle - oMinimumAngle) +oMinimumAngle</description>
      <pubDate>Wed, 13 Oct 2004 10:27:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38229#M40197</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-13T10:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: random generation of a '-1' or '1' flag?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38230#M40198</link>
      <description>thanks guys!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
~/archiben</description>
      <pubDate>Fri, 15 Oct 2004 13:35:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/random-generation-of-a-1-or-1-flag/m-p/38230#M40198</guid>
      <dc:creator>__archiben</dc:creator>
      <dc:date>2004-10-15T13:35:33Z</dc:date>
    </item>
  </channel>
</rss>

