1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Temporary commit; lots of test code and stuff

This commit is contained in:
Perttu Ahola 2011-02-21 00:45:14 +02:00
parent f5ff378dd0
commit c57637b4c3
25 changed files with 1917 additions and 763 deletions

View file

@ -683,32 +683,6 @@ struct MapNode
}
};
/*
Returns integer position of the node in given
floating point position.
*/
inline v3s16 floatToInt(v3f p)
{
v3s16 p2(
(p.X + (p.X>0 ? BS/2 : -BS/2))/BS,
(p.Y + (p.Y>0 ? BS/2 : -BS/2))/BS,
(p.Z + (p.Z>0 ? BS/2 : -BS/2))/BS);
return p2;
}
/*
The same thing backwards
*/
inline v3f intToFloat(v3s16 p)
{
v3f p2(
p.X * BS,
p.Y * BS,
p.Z * BS
);
return p2;
}
#endif