Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Got a question  (Read 1111 times)

0 Members and 1 Guest are viewing this topic.

Ryuza

That one guy
Got a question
« on: November 11, 2010, 01:29:06 am »
  • RyuKage2007
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 290
So, I've been going through cutting down on unneeded code to tidy up things a bit and I come across a huge bulk of code I've been using to check if a certain variable is within the range of certain numbers. I had a feeling there was a much easier way of going about it so I thought I'd ask around here.

Is there any other way to check if a variable is between two values (variable A is greater than -2 and less than 2) other than this:
Code: [Select]
if 'A' > -2 && 'A' < 2 {"Action"}
Just wondering if anyone else knows of another way to go about this.
« Last Edit: November 11, 2010, 04:19:25 am by Ryuza »
Logged
<- Koholint Island - MC Style  <- Link's Awakening Photo Recolors  <- Wind Waker 3D Resources <- Super Mario Bros Crossover
  • RyuKage2007's Youtube

Xiphirx

wat
Re: Got a question
« Reply #1 on: November 11, 2010, 09:58:09 pm »
  • Xiphirx
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3007
abs('A') < 2 ?

Only other way I can think of atm...
Logged
  • For The Swarm
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.049 seconds with 41 queries.

anything