ToggleGridSnap command (beware of it)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@401 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
@@ -105,6 +105,8 @@ template<typename Element, typename OtherElement>
|
||||
inline Element float_snapped(const Element& f, const OtherElement& snap)
|
||||
{
|
||||
//return Element(float_to_integer(f / snap) * snap);
|
||||
if(snap == 0)
|
||||
return f;
|
||||
return Element(llrint(f / snap) * snap); // llrint has more significant bits
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user