main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
644 bytes
|
Line | |
---|
1 | {{# def.definitions }}
|
---|
2 | {{# def.errors }}
|
---|
3 | {{# def.setupKeyword }}
|
---|
4 | {{# def.$data }}
|
---|
5 |
|
---|
6 | {{# def.numberKeyword }}
|
---|
7 |
|
---|
8 | var division{{=$lvl}};
|
---|
9 | if ({{?$isData}}
|
---|
10 | {{=$schemaValue}} !== undefined && (
|
---|
11 | typeof {{=$schemaValue}} != 'number' ||
|
---|
12 | {{?}}
|
---|
13 | (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
|
---|
14 | {{? it.opts.multipleOfPrecision }}
|
---|
15 | Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
|
---|
16 | {{??}}
|
---|
17 | division{{=$lvl}} !== parseInt(division{{=$lvl}})
|
---|
18 | {{?}}
|
---|
19 | )
|
---|
20 | {{?$isData}} ) {{?}} ) {
|
---|
21 | {{# def.error:'multipleOf' }}
|
---|
22 | } {{? $breakOnError }} else { {{?}}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.