private Vector3 SnapLocalPoint(Vector3 localPoint) { var x = Mathf.Abs(localPoint.x); var y = Mathf.Abs(localPoint.y); var z = Mathf.Abs(localPoint.z); // X largest? if (x > y && x > z) { localPoint *= VA_Helper.Reciprocal(x * 2.0f); } // Y largest? else if (y > x && y > z) { localPoint *= VA_Helper.Reciprocal(y * 2.0f); } // Z largest? else { localPoint *= VA_Helper.Reciprocal(z * 2.0f); } return(localPoint); }