Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

multipleOf.jst 618B

1234567891011121314151617181920
  1. {{# def.definitions }}
  2. {{# def.errors }}
  3. {{# def.setupKeyword }}
  4. {{# def.$data }}
  5. var division{{=$lvl}};
  6. if ({{?$isData}}
  7. {{=$schemaValue}} !== undefined && (
  8. typeof {{=$schemaValue}} != 'number' ||
  9. {{?}}
  10. (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
  11. {{? it.opts.multipleOfPrecision }}
  12. Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
  13. {{??}}
  14. division{{=$lvl}} !== parseInt(division{{=$lvl}})
  15. {{?}}
  16. )
  17. {{?$isData}} ) {{?}} ) {
  18. {{# def.error:'multipleOf' }}
  19. } {{? $breakOnError }} else { {{?}}