Description
Get X, Y from right, bottom corner from rectangle
Inputs
-
Rectangle - X
-
Rectangle - Y
-
Rectangle - width
-
Rectangle - height
Outputs
-
right bottom corner - X
-
right bottom corner - Y
Neuron type
Best algorithm has been found - locked
Patterns
Pattern |
Input |
Output |
1. |
Rectangle - X: |
3 |
Rectangle - Y: |
1 |
Rectangle - width: |
1 |
Rectangle - height: |
1 |
|
right bottom corner - X: |
4 |
right bottom corner - Y: |
2 |
|
2. |
Rectangle - X: |
1 |
Rectangle - Y: |
4 |
Rectangle - width: |
4 |
Rectangle - height: |
2 |
|
right bottom corner - X: |
5 |
right bottom corner - Y: |
6 |
|
3. |
Rectangle - X: |
2 |
Rectangle - Y: |
1 |
Rectangle - width: |
1 |
Rectangle - height: |
2 |
|
right bottom corner - X: |
3 |
right bottom corner - Y: |
3 |
|
Applicable neurons
-
Plus (x + y)
-
Minus (x - y)
-
Multiple (x × y)
-
Division (x ÷ y)
-
Absolute value
-
Simple interest
-
character ≠
-
word capital
-
max (from 2 values)
-
First child X position
-
sql A+B
-
convert seconds into hours, minutes and seconds
Algorithm
Test
Code made by AI:
/**
* 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()];
}
/**
* right bottom: Get X, Y from right, bottom corner from rectangle
*
* @param x1 Rectangle - X
* @param x2 Rectangle - Y
* @param x3 Rectangle - width
* @param x4 Rectangle - height
* @return {Array}
*/
function neuron837(x1, x2, x3, x4)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;
outputs[2] = x3;
outputs[3] = x4;
arr = neuron1(outputs[1], outputs[3]);
outputs[4] = arr[0];
arr = neuron1(outputs[0], outputs[2]);
outputs[5] = arr[0];
return[outputs[5], outputs[4]];
}
Code made by AI: