title: Golang how can I multiply a integer and a float
body: <p>I am trying to resize the dimensions of an image but am getting a <strong>constant 0.8 truncated to integer</strong> error on compile . This is my code</p>
  
  <pre><code>b := img.Bounds()
  
  heightImg := b.Max.Y  // height of image in pixels
  widthImg := b.Max.X   // width of image in pixels
  const a = .80
  height := int(heightImg * a) // reduce height by 20%
  width := int(widthImg * a)  // reduce width by 20%
  
   // resize image below which take in type int, int in the 2nd &amp; 3rd parameter
  new_img := imaging.Resize(img,width,height, imaging.Lanczos)
  </code></pre>
  
  <p>I am new to golang but this code right here gives me the error</p>
  
  <pre><code>    height := int(heightImg * a) 
      width := int(widthImg * a)
  </code></pre>
  
  <p>any suggestions would be great</p>