@openhps/core
Version:
Open Hybrid Positioning System - Core component
25 lines • 1.04 kB
JavaScript
import { __decorate, __metadata } from "tslib";
import { SerializableObject, SerializableMember } from '../decorators';
import { AngularVelocity } from './AngularVelocity';
import { LinearVelocity } from './LinearVelocity';
/**
* Velocity of the object at the recorded position
* @category Sensor Value
*/
let Velocity = class Velocity {
constructor(linear, angular) {
this.linear = linear;
this.angular = angular;
}
/**
* Clone the velocity
* @returns {Velocity} Cloned velocity object
*/
clone() {
return new this.constructor(this.linear ? this.linear.clone() : undefined, this.angular ? this.angular.clone() : undefined);
}
};
__decorate([SerializableMember(), __metadata("design:type", LinearVelocity)], Velocity.prototype, "linear", void 0);
__decorate([SerializableMember(), __metadata("design:type", AngularVelocity)], Velocity.prototype, "angular", void 0);
Velocity = __decorate([SerializableObject(), __metadata("design:paramtypes", [LinearVelocity, AngularVelocity])], Velocity);
export { Velocity };