{"size": 748, "ext": "js", "max_stars_repo_path": "src/js/float.js", "max_stars_repo_name": "virtools/visualScripting", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/js/float.js", "max_issues_repo_name": "virtools/visualScripting", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/js/float.js", "max_forks_repo_name": "virtools/visualScripting", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.7777777778, "max_line_length": 79, "alphanum_fraction": 0.4745989305}
const guid = () => {
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
    const r = (Math.random() * 16) | 0,
      v = c == "x" ? r : (r & 0x3) | 0x8;
    return v.toString(16);
  });
};
export class Float {
  static mix(a, b, t) {
    return a * (1 - t) + b * t;
  }
  static fract(val) {
    val = val % 1;
    return val < 0 ? val + 1 : val;
  }
  static inverseMix(a, b, t) {
    return (t - a) / (b - a);
  }
  static clamp(val, min = 0, max = 1) {
    if (val <= min) {
      return min;
    }
    if (val >= max) {
      return max;
    }
    return val;
  }
  static smoothstep(a, b, t) {
    t = clamp(inverseMix(a, b, t));
    return t * t * (3.0 - 2.0 * t);
  }
  static guid() {
    return guid();
  }
}
