Skip to content

Instantly share code, notes, and snippets.

@yuchenQ
Last active May 17, 2021 00:34
Show Gist options
  • Save yuchenQ/74f430b9e32f2238d4cd6f2c3ba89d74 to your computer and use it in GitHub Desktop.
Save yuchenQ/74f430b9e32f2238d4cd6f2c3ba89d74 to your computer and use it in GitHub Desktop.
PFA criteria 2
const largerThan = [5000]; // >= 5000 ? > 5000 ?
const smallerThan1 = [1, 5000] // <= 5000 ?
const smallerThan2 = [0, 4999] // < 5000 ?
const equal = [1, 1];
const ptrData = [
{
id: 'frostie-brizzie',
criteria: [
{
name: 'width',
range: [3000, 4000], // 3000 <= x <= 4000
},
{
name: 'height',
range: [3000, 4000], // 3000 <= x <= 4000
},
{
name: 'aspectRatio',
range: [1, 1], // must be 1
},
],
},
{
// OR will be another row of data
id: 'frostie-brizzie',
criteria: [
{
name: 'width',
range: [5000, 5000], // must be 5000
},
{
name: 'height',
range: [5000, 5000], // must be 5000
},
],
},
{
id: 'big-wheelie',
criteria: [
{
name: 'width',
range: [1000], // >= 1000
},
{
name: 'height',
range: [1, 5000], // <= 5000
},
],
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment