FaceMatch.js 842 B

123456789101112131415161718192021222324
  1. import { round } from '../utils';
  2. var FaceMatch = /** @class */ (function () {
  3. function FaceMatch(label, distance) {
  4. this._label = label;
  5. this._distance = distance;
  6. }
  7. Object.defineProperty(FaceMatch.prototype, "label", {
  8. get: function () { return this._label; },
  9. enumerable: true,
  10. configurable: true
  11. });
  12. Object.defineProperty(FaceMatch.prototype, "distance", {
  13. get: function () { return this._distance; },
  14. enumerable: true,
  15. configurable: true
  16. });
  17. FaceMatch.prototype.toString = function (withDistance) {
  18. if (withDistance === void 0) { withDistance = true; }
  19. return "" + this.label + (withDistance ? " (" + round(this.distance) + ")" : '');
  20. };
  21. return FaceMatch;
  22. }());
  23. export { FaceMatch };
  24. //# sourceMappingURL=FaceMatch.js.map