/**
* Check whether this road can have the given end points as its end points.
*
* @param endPoints
* The end points to check.
* @return True if the given is a 2x2 array with angles in between 0 and the maximum angle
* | result == ...
*/
@Raw
public boolean canHaveAsEndPoints(double[][] endPoints) {
int correct = 0;
for (double[] endPoint:endPoints) {
for (double angle:endPoint) {
if(canHaveAsAngle(angle))
correct += 1;
}
}
return (endPoints[0].length == 2 && endPoints[1].length == 2 && correct == 4);
}
/**
* Check whether this angle is valid.
*
* @param angle
* The angle to check.
* @return True if the given is in between 0 and the maximum defined angle
* | result == (angle >= 0 && angle <= MAX_ANGLE)
*/
/**
* Initialize this new road with given identification, given end points.
*
* @param identification
* The identification for this new road.
* @param endPoint1
* The first end point for this new road.
* @param endPoint2
* The second end point for this new road.
* @pre This new road can have the given end points as its end points.
* | canHaveAsEndPoints(new double[] {endPoint1,endPoint2})
* @post The identification of this new road is equal to the given
* identification.
* | new.getIdentification() == identification
* @post The identification of this new road is present in the list
* list of identifications.
* | ids.contains(identification)
* @post The end points of this new road is equal to the given
* end points.
* | new.getEndPoints() == new double[] {endPoint1,endPoint2}
* @throws IllegalArgumentException
* The given identification is not a valid identification for
* any road.
* | ! isValidIdentification(identification)
*/
* @return The resulting rational number has the same value as a rational number
* whose denominator is equal to the denominator of this rational
* number in normalized form, and whose numerator is equal to the
* numerator of this rational number in normalized form multiplied
* with the given factor divided by the greatest common divisor of
* the absolute value of that factor and the denominator of this
* rational number in normalized form.
* | let
* | reducedFactor = factor / ExtMath.gcd
* | (Math.abs(factor),this.normalize().getDenominator())
* | in
* | result.hasSameValueAs(
* | new Rational(
* | this.normalize().getNumerator()*reducedFactor,
* | this.normalize().getDenominator()))
:^)
[SERVER] OwO
Torogadude HATES this illegal trick^
) >2019
>Not taking it up the ass
>When Ain begins posting random memes
Not sure. The Russian 4chan equiv?>Be Australian
>Fight a bunch of birds
>Use machineguns and shit
>Lose
hey nick how is that --> canser <--?
:^(