Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-27-2009, 04:24 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Tyhm View Post
I'd love to, but it's difficult to determine if the bitflag 262143 contains 32768 (2^15th) or not without doing a little division.
if ((262143 & 32768) != 0), no?
Reply With Quote
  #2  
Old 01-27-2009, 11:10 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by Skyld View Post
if ((262143 & 32768) != 0), no?
I've never noticed that kind of syntax in GS2 (single ampersand)...
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #3  
Old 01-27-2009, 11:27 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by LoneAngelIbesu View Post
I've never noticed that kind of syntax in GS2 (single ampersand)...
It's very practical

PHP Code:
function onCreated() {
  
temp.bit 2+4+16;

  if (
bit 2) echo("2");
  if (
bit 4) echo("4");
  if (
bit 8) echo("8");
  if (
bit 16) echo("16");

Echoes

Quote:
2
4
16
(move() uses this)
__________________
Reply With Quote
  #4  
Old 01-27-2009, 11:49 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Pseudo-bitwise operation on what amounts to floating point numbers are a bit scary.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.