export function square() {
return {
value: null,
setValue: (params) => {
if(params.topWidth && params.bottomWidth && params.height) {
this.value = 0.5 * (params.topWidth + params.bottomWidth) + params.height;
} else {
this.value = new Error('Not all required params provided');
}
}
}
}