Browse Source

Fix minheight calculation

main
Дмитрий 2 years ago
parent
commit
ff3660912a
  1. 4
      cmd/client_server/client.go

4
cmd/client_server/client.go

@ -50,12 +50,12 @@ func constructPartnersRequestBody(ir *req_types.IncomingRequest) []byte {
var imps []req_types.Imp var imps []req_types.Imp
// WARN: uint and float multiplication may cause problems
for _, tile := range ir.Tiles { for _, tile := range ir.Tiles {
minheight := uint(math.Floor(float64(tile.Width) * tile.Ratio))
imps = append(imps, req_types.Imp{ imps = append(imps, req_types.Imp{
Id: tile.Id, Id: tile.Id,
Minwidth: tile.Width, Minwidth: tile.Width,
Minheight: uint(math.Floor(float64(tile.Width * uint(tile.Ratio))))}) Minheight: minheight})
} }
outReqBody.Id = *ir.Id outReqBody.Id = *ir.Id

Loading…
Cancel
Save