16 lines
458 B
Java
16 lines
458 B
Java
package quantities.generic;
|
|
|
|
import static quantities.generic.LengthUnit.METER;
|
|
import static quantities.generic.TimeUnit.SECOND;
|
|
import static quantities.generic.VelocityUnit.METER_PER_SECOND;
|
|
|
|
public class Velocity extends Quantity<Velocity> {
|
|
public Velocity(double value, Unit<Velocity> unit) {
|
|
super(value, unit);
|
|
}
|
|
|
|
public Length mult(Time t) {
|
|
return METER.quantity(this.value(METER_PER_SECOND) * t.value(SECOND));
|
|
}
|
|
}
|