Pages: [1]
  Print  
Author Topic: Alternate to move_snap  (Read 1716 times)
Offline (Male) RetroX
Posted on: December 01, 2008, 05:25:08 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Since I realized it wasn't there.

Code: [Select]
x=round(x/argument0)*argument0;
y=round(y/argument1)*argument1;
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) ludamad
Reply #1 Posted on: December 02, 2008, 02:05:04 PM
Developer
Joined: May 2008
Posts: 1256

View Profile Email
Or:
x-=x%argument0;
y-=y%argument1;
Logged
Offline (Male) Rusky
Reply #2 Posted on: December 02, 2008, 07:36:19 PM

Resident Troll
Joined: Feb 2008
Posts: 960
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
mod doesn't work quite as well as round.
Logged
Pages: [1]
  Print