JSFiddle - React, Tailwind, and code Playground

by tara5

JavaScript

function max(a, b) {
	return ((a+b)/2) + ((((a+b)/2) - b) * (a - b));
}

console.log(max(3, 6));