Function suggestions.
Displaying 1-3 of 3 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Overkill

I believe that we could use some of the following functions in V3:

// Simple mathematical builtins
int min(int a, int b) // Minimum of two integers.
int max(int a, int b) // Maximum of two integers.
int abs(int val) // Absolute value of an integer.
int distance(int x, int y, int x2, int y2) // Gets the absolute distance from point (x, y) to (x2, y2).

// Net stuff.
int SocketConnectPort(string hostname, int port) // Connect to the specified server port.
void ListenPort(int port) // Allow a server to listen for socket connects to the specified port.
void SocketSendRaw(int socket, string raw) // Send a raw string to a socket.

// Clipboard stuff.
void CopyTextToClipboard(string txt)
string GetTextFromClipboard()

// Entity stuff.
int GetPlayer() // It could have its uses.

// Image stuff.
int GetLucent() // You could revert to a previous lucency in a function, or use the current lucency to calculate other lucencies.


Eh, just suggestions. Discuss the ones you disagree or agree with?

Posted on 2005-07-22 20:39:47

mcgrue

Distance is nerfd by fixed point.

Posted on 2005-07-22 20:55:02

Overkill

So, you're saying using the sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)); formula is screwed up when you use fixed point? Howso?

Posted on 2005-07-22 21:08:57


Displaying 1-3 of 3 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.