请教:在学习usdt代码的时候,下面这段代码 uint fee = (_value.mul(basisPointsRate)).div(10000); 的"."点符号有点不太懂,
假如transfer函数的_value参数传入100,basisPointsRate这个上面有赋值的为0,代码就不贴了 uint fee = (100.mul(0)).div(10000); 。 现在这个(100.mul(0)).div(10000) 有点不太理解了,向大佬请教
function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32){
uint fee = (_value.mul(basisPointsRate)).div(10000);
if (fee > maximunFee) fee = maximunFee;
uint sendAmount = _value.sub(fee);
balances[msg.sender] = balances[msg.sender].sub(sendAmount);
balances[_to] = balances[_to].add(sendAmount);
if (fee > 0){
balances[owner] = balances[owner].add(fee);
emit Transfer(msg.sender, owner, fee);
}
emit Transfer(msg.sender, _to, sendAmount);
}