2
0

kleiner reformat

Signed-off-by: Johannes Theiner <j.theiner@live.de>
This commit is contained in:
Johannes Theiner 2020-04-07 19:09:29 +02:00
parent 2158161106
commit ce2ce5d880
2 changed files with 10 additions and 9 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.iml
.idea
target

View File

@ -1,25 +1,25 @@
package de.hsel.sqs;
/**
* @author Johannes Theiner
* @author Julian Hinxlage
* @version 0.1
* @since 0.1
**/
public class TriangleChecker {
public static TriangleType checkTriangle(int a, int b, int c) {
if(a < 0 || b < 0 || c < 0){
if (a < 0 || b < 0 || c < 0)
return TriangleType.NO_TRIANGLE;
}
if(a == b && a == c){
if (a == b && a == c)
return TriangleType.EQUILATERAL_TRIANGLE;
}
if(a == b || a == c || b == c){
if (a == b || a == c || b == c)
return TriangleType.ISOSCELESS_TRIANGLE;
}
if(a + b > c && a + c > b && b + c > a){
if (a + b > c && a + c > b && b + c > a)
return TriangleType.SCALENE_TRIANGLE;
}
return TriangleType.NO_TRIANGLE;
}