public class Desire extends Object implements Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
Desire(Dimensionless left,
Dimensionless right)
Constructor which sets the supplied desire.
|
Desire(double left,
double right)
Constructor which sets the supplied desire.
|
Modifier and Type | Method and Description |
---|---|
double |
get(LateralDirectionality dir)
Returns desire in the given direction.
|
double |
getLeft()
Returns lane change desire to left.
|
double |
getRight()
Returns lane change desire to right.
|
boolean |
leftIsLargerOrEqual()
Returns whether the left desire is larger than (or equal to) the right.
|
String |
toString() |
public Desire(double left, double right)
left
- double; Left desire.right
- double; Right desire.public Desire(Dimensionless left, Dimensionless right)
left
- Dimensionless; Left desire.right
- Dimensionless; Right desire.public final double get(LateralDirectionality dir)
dir
- LateralDirectionality; Direction for the desire to return.public final double getLeft()
public final double getRight()
public final boolean leftIsLargerOrEqual()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.