DiscreteDistDirection.java
package org.opentrafficsim.core.units.distributions;
import org.djunits.unit.AngleUnit;
import org.djunits.unit.DirectionUnit;
import org.djunits.value.vdouble.scalar.Direction;
import nl.tudelft.simulation.jstats.distributions.DistDiscrete;
/**
* Discretely distributed direction.
* <p>
* Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
* BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
* </p>
* @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
*/
// This class was automatically generated
public class DiscreteDistDirection extends DiscreteDistDoubleScalar.Abs<Direction, DirectionUnit, AngleUnit>
{
/** */
private static final long serialVersionUID = 20180829L;
/**
* @param distribution DistDiscrete; distribution
* @param unit DirectionUnit; units
*/
public DiscreteDistDirection(final DistDiscrete distribution, final DirectionUnit unit)
{
super(distribution, unit);
}
/** {@inheritDoc} */
@Override
public Direction draw()
{
return new Direction(getDistribution().draw(), (DirectionUnit) getUnit());
}
/** {@inheritDoc} */
@Override
public final String toString()
{
return "DiscreteDistDirection []";
}
}