import boundary from './boundary'

export default function average(x, y, factor) {
  factor = boundary(factor, 0, 1)
  return Math.floor(((1 - factor) * x + 2 * factor * y) / 2)
}


@@ -131,17 +131,16 @@
 .floor((
-(
 1 - fact
@@ -152,12 +152,8 @@
  x +
- 2 *
  fac
@@ -164,13 +164,8 @@
 * y)
- / 2)
 %0A%7D%0A%0A

Fix averaging / mixing of colours