+ Reply to Thread
Results 1 to 6 of 6

Thread: (x == a +/- b) ?

  1. #1
    Wirererer Uocjat's Avatar
    Join Date
    Aug 2007
    Location
    DK
    Posts
    122

    Default (x == a +/- b) ?

    i was just wondering for no paticulare reason if there happen to be a function for the e2 that would let you say something to the effect of
    Code:
    if (X == A +/- B)
    as in having it return true if X is within (lets say 10) higher or lower of A
    i know you could propperly set a range and have it check against that somehow but it's been far too long since i've used anything like that
    <(^^<) /\(^^)/\ (>^^)> <(^^)>

  2. #2
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,581

    Default Re: (x == a +/- b) ?

    Code:
    if (inrange(X,-10,10)) {
    or
    if (X > -10 & X < 10) {
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  3. #3
    Wire Sofaking Azrael's Avatar
    Join Date
    Aug 2007
    Posts
    1,946

    Default Re: (x == a +/- b) ?

    if (inrange(X, A-B, A+B))
    if (abs(X-A)<B)
    Last edited by Azrael; 03-19-2010 at 04:51 AM. Reason: FUCKING SMILIES

  4. #4
    Wire Sofaking emspike's Avatar
    Join Date
    Feb 2008
    Posts
    911

    Default Re: (x == a +/- b) ?

    Read the wiki.

  5. #5
    I think I think too much -HP-'s Avatar
    Join Date
    Feb 2009
    Location
    Behind you with a very sharp knife.
    Posts
    2,466

    Default Re: (x == a +/- b) ?

    Quote Originally Posted by emspike View Post
    Read the wiki.
    Isn't always too easy when you don't know what you look for.

  6. #6
    Wirererer Uocjat's Avatar
    Join Date
    Aug 2007
    Location
    DK
    Posts
    122

    Default Re: (x == a +/- b) ?

    cheers all should be very useful in the future
    *tosses cookies for all*
    <(^^<) /\(^^)/\ (>^^)> <(^^)>

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots