Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / please help!!

Author
Message
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 15th Apr 2008 05:58 Edited at: 15th Apr 2008 06:05
hi guys
can anyone help me to convert this code from dbpro to darkgdk ?

not all code but i cant understanding this line

wx#???
im not good in dbpro
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 15th Apr 2008 07:28
The ^2 is equivalent to the C function pow(x,y), where y = 2.
bobba
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 28th Apr 2008 16:33
it is checking a distance in 3d,

To do squar root which is what sqrt meand you need to include maths.h

This should do it:

#include "math.h"

if (sqrt( (wx# - bX#)(wx# - bX#) + ((wy# - bY#)(wy# -bY#)) + ((wz# - bZ#)(wz# - bZ#)) < 20)


This line will do the same an be way faster. sqrt is slow so it is quicker to squar the distance to be compared and do not sure the distance.
if (( (wx# - bX#)(wx# - bX#) + ((wy# - bY#)(wy# -bY#)) + ((wz# - bZ#)(wz# - bZ#)) < 400)
tobi453
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 28th Apr 2008 16:54
hi bobba,

this won't work. you must remove the "#"

FINAL VERSION RELEASED!!!!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Apr 2008 18:58
Removing the Pound Signs Makes your code lighter

Login to post a reply

Server time is: 2024-11-20 09:24:32
Your offset time is: 2024-11-20 09:24:32