You can easily handle that issue by working in hundreds or thousands or whatever precision you need.
Working in thousands, for example, means that you would not calculate 2% of 340, but 2% of 340000. The result will be 6800, which is an integer. Now that you know that your smart contract works in thousands, the part that makes the function call (web3?), and that probably is able to handle floats, just has to divide the result of 6800 by 1000.
This is basically the same as using fixed point math, the only difference is that in fix point math, you are working with precisions of powers of two, which might feel unusual, since we usually think in fractions of powers if ten.
Note that if you do multiplication/division of numbers that are "in thousands" you need to divide/multiply after the operation by 1000, in order to return to a precision of thousands.