mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +12:00
Add BBCODE to Horse Descriptions, Player Descriptions and Ranch Descriptions.
This commit is contained in:
parent
bdebe4d84a
commit
72bc81d900
14 changed files with 142 additions and 40 deletions
|
@ -9,11 +9,6 @@ namespace HISP.Server
|
|||
private static int getHexVal(char hex)
|
||||
{
|
||||
int val = (int)hex;
|
||||
//For uppercase A-F letters:
|
||||
//return val - (val < 58 ? 48 : 55);
|
||||
//For lowercase a-f letters:
|
||||
//return val - (val < 58 ? 48 : 87);
|
||||
//Or the two combined, but a bit slower:
|
||||
return val - (val < 58 ? 48 : (val < 97 ? 55 : 87));
|
||||
}
|
||||
public static byte[] StringToByteArray(string hex)
|
||||
|
@ -31,6 +26,8 @@ namespace HISP.Server
|
|||
return arr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static Double PointsToDistance(int x1, int y1, int x2, int y2)
|
||||
{
|
||||
return Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue