'use strict';

/**
 * Internal dependencies
 */
let NormalDistribution = require( './normal-distribution' );

// See: http://mathworld.wolfram.com/NormalDifferenceDistribution.html
function NormalDifferenceDistribution( proportionA, proportionB ) {
	let mean = proportionB.mean - proportionA.mean,
		sd = Math.sqrt( proportionA.variance + proportionB.variance );
	NormalDistribution.call( this, mean, sd );
}

NormalDifferenceDistribution.prototype = Object.create( NormalDistribution.prototype );
NormalDifferenceDistribution.prototype.constructor = NormalDifferenceDistribution;

module.exports = NormalDifferenceDistribution;

@@ -178,16 +178,13 @@
 tml%0A
-function
+class
  Nor
@@ -208,16 +208,58 @@
 ribution
+ extends NormalDistribution %7B%0A%09constructor
 ( propor
@@ -281,16 +281,17 @@
 onB ) %7B%0A
+%09
 %09let mea
@@ -331,16 +331,17 @@
 A.mean,%0A
+%09
 %09%09sd = M
@@ -402,38 +402,15 @@
 );%0A%09
-NormalDistribution.call( this,
+%09super(
  mea
@@ -422,181 +422,12 @@
  );%0A
+%09
 %7D%0A
-%0ANormalDifferenceDistribution.prototype = Object.create( NormalDistribution.prototype );%0ANormalDifferenceDistribution.prototype.constructor = NormalDifferenceDistribution;
+%7D
 %0A%0Amo

Convert Normal Difference Distribution class to ES6