2020-08-20 02:10:42 +02:00
|
|
|
import { round } from '../utils';
|
|
|
|
export class FaceMatch {
|
2020-08-18 14:04:33 +02:00
|
|
|
constructor(label, distance) {
|
|
|
|
this._label = label;
|
|
|
|
this._distance = distance;
|
|
|
|
}
|
|
|
|
get label() { return this._label; }
|
|
|
|
get distance() { return this._distance; }
|
|
|
|
toString(withDistance = true) {
|
2020-08-20 02:10:42 +02:00
|
|
|
return `${this.label}${withDistance ? ` (${round(this.distance)})` : ''}`;
|
2020-08-18 14:04:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//# sourceMappingURL=FaceMatch.js.map
|