# center bottom

## Description

Get X, Y from center, bottom corner from rectangle

## Inputs

• Rectangle - X
• Rectangle - Y
• Rectangle - width
• Rectangle - height

## Outputs

• center bottom corner - X
• center bottom corner - Y

## Neuron type

Best algorithm has been found - locked

## Patterns

Pattern Input Output
1.
 Rectangle - X: 1 Rectangle - Y: 4 Rectangle - width: 4 Rectangle - height: 2
 center bottom corner - X: 3 center bottom corner - Y: 6
2.
 Rectangle - X: 2 Rectangle - Y: 1 Rectangle - width: 1 Rectangle - height: 2
 center bottom corner - X: 2.5 center bottom corner - Y: 3
3.
 Rectangle - X: 0 Rectangle - Y: 0 Rectangle - width: 0 Rectangle - height: 0
 center bottom corner - X: 0 center bottom corner - Y: 0
4.
 Rectangle - X: 0 Rectangle - Y: 0 Rectangle - width: 4 Rectangle - height: 1
 center bottom corner - X: 2 center bottom corner - Y: 1

## Applicable neurons

• Plus (x + y)
• Minus (x - y)
• Multiple (x × y)
• Division (x ÷ y)
• Half (0.5)
• -1
• x to the 2 (x²)
• Connect - five inputs
• delete character at the end of a sentence

## Algorithm

### Test

```/**
* character .:
*
* @return {Array}
*/
function neuron510()
{
return['.'];
}

/**
* 5:
*
* @return {Array}
*/
function neuron505()
{
return [5];
}

/**
* Connect - two inputs:
*
* @param x1 Variable A
* @param x2 Variable B
* @return {Array}
*/
function neuron520(x1, x2)
{
return [x1.toString()+x2.toString()];
}

/**
* Half (0.5):
*
* @return {Array}
*/
function neuron522()
{
var outputs = [];

arr = neuron510();
outputs[0] = arr[0];

arr = neuron505();
outputs[1] = arr[0];

arr = neuron520(outputs[0], outputs[1]);
outputs[2] = arr[0];

return[outputs[2]];
}

/**
* Multiple (x × y):
*
* @param x1 Number X
* @param x2 Number Y
* @return {Array}
*/
function neuron3(x1, x2)
{
math.config({number: 'BigNumber', precision: 64}); return [math.eval(Number(x1) + '*'+Number(x2)).toString()];
}

/**
* Plus (x + y): The addition of two whole numbers is the total amount of those quantities combined.
*
* @param x1 first number
* @param x2 second number
* @return {Array}
*/
function neuron1(x1, x2)
{
math.config({number: 'BigNumber', precision: 64}); return [math.eval(Number(x1) + '+'+Number(x2)).toString()];
}

/**
* center bottom: Get X, Y from center, bottom corner from rectangle
*
* @param x1 Rectangle - X
* @param x2 Rectangle - Y
* @param x3 Rectangle - width
* @param x4 Rectangle - height
* @return {Array}
*/
function neuron838(x1, x2, x3, x4)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;
outputs[2] = x3;
outputs[3] = x4;

arr = neuron522();
outputs[4] = arr[0];

arr = neuron3(outputs[4], outputs[2]);
outputs[5] = arr[0];

arr = neuron1(outputs[3], outputs[1]);
outputs[6] = arr[0];

arr = neuron1(outputs[5], outputs[0]);
outputs[7] = arr[0];

return[outputs[7], outputs[6]];
}

```