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.

PureGDK / dbCurveAngle

Author
Message
aonyn
14
Years of Service
User Offline
Joined: 16th Oct 2009
Location:
Posted: 20th Oct 2009 04:46
Hi Mistrel,

I noticed that darkbasic pro has a command 'CurveAngle'.

However, in pureGDK, I do not see a 'dbCurveAngle'.
I looked at the list of obsolete core commands, and this one is not listed there either, so I am wondering if this was simply an oversight, or if perhaps I somehow missed it.

regards,
Dave
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 20th Oct 2009 05:13
PureGDK does have dbCurveValue. Looking at the DBP documentation I can't see a difference between CURVEVALUE and CURVEANGLE. This is most likely why it was dropped.

Is there really a difference between these two commands?

aonyn
14
Years of Service
User Offline
Joined: 16th Oct 2009
Location:
Posted: 20th Oct 2009 05:25
I really don't know, they may indeed be the same, but I wonder if perhaps there is some difference, considering that dbpro includes both as separate functions.

This is speculation only, but perhaps curve angle automatically wraps curve values, or something like that.

Anyway, this is not anything urgent, just something I noticed while tinkering.

I will experiment with the two directly in dbpro, and see if I can identify any difference in what they return, and I will let you know here what I find.

Thanks for the quick reply.

regards,
Dave
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Oct 2009 12:35 Edited at: 20th Oct 2009 12:35
@Mistrel
They are very different commands, 'curvevalue' causes one value to gradually approach another, 'curveangle' causes one angle to gradually approach another, taking the fastest route possible. (Angles wrap around at 360 degrees, values do not)

Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 20th Oct 2009 15:01 Edited at: 20th Oct 2009 15:08
So wouldn't CURVEANGLE be the same as using dbCurveValue and dbWrapValue? Do we really need a separate function for this?



Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Oct 2009 15:08 Edited at: 20th Oct 2009 15:09
No

- Curvevalue and curveangle take 3 parameters not 1
- Going from 340 to 20 will go via 350 in curveangle, not via 330 as in curvevalue.

Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 20th Oct 2009 15:09
I made an edit at the same time you posted. Check again.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Oct 2009 15:10
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 20th Oct 2009 15:11
Did you run the example? The output is the same.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Oct 2009 15:15 Edited at: 20th Oct 2009 15:23
@Mistrel
Because those values don't demonstrate the purpose of curveangle.

These pieces of code are equivalent:




IMO, it would be better to have a separate command to do it.

edit:
Fixed code

Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 20th Oct 2009 15:19
I've never actually used it before so I'll take your word for it. It will be added back in the next release.

aonyn
14
Years of Service
User Offline
Joined: 16th Oct 2009
Location:
Posted: 20th Oct 2009 23:49
Thanks Mistrel for adding the command, and thanks Diggsey for your input and knowledge of the command.

regards,
Dave

Login to post a reply

Server time is: 2024-04-20 00:15:37
Your offset time is: 2024-04-20 00:15:37