predicates.orient2dShiftedSign
This function gives the exact sign of `orient2dShifted` without the stage. It is the form for a hot loop.
CLI- Package
- @procedures/predicates · README
- Path
["predicates","orient2dShiftedSign"]- CLI
mark predicates orient2dShiftedSign --ax <number> --ay <number> --bx <number> --by <number> --cx <number> --cy <number> --tx <number> --ty <number>- As data
{"$proc":["predicates","orient2dShiftedSign"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/predicates/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["predicates","orient2dShiftedSign"], { ax: 1, ay: 1, bx: 1, by: 1, cx: 1, cy: 1, tx: 1, ty: 1 });
console.log(JSON.stringify(result));From the command line
$ mark predicates orient2dShiftedSign --ax <number> --ay <number> --bx <number> --by <number> --cx <number> --cy <number> --tx <number> --ty <number>
As data, in a program
{
"$proc": ["predicates", "orient2dShiftedSign"],
"input": {
"ax": 1,
"ay": 1,
"bx": 1,
"by": 1,
"cx": 1,
"cy": 1,
"tx": 1,
"ty": 1
}
}Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
ax | number | yes | ||
ay | number | yes | ||
bx | number | yes | ||
by | number | yes | ||
cx | number | yes | ||
cy | number | yes | ||
tx | number | yes | ||
ty | number | yes |
Output
The schema does not list fields (number | number | number).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"ax": {
"type": "number"
},
"ay": {
"type": "number"
},
"bx": {
"type": "number"
},
"by": {
"type": "number"
},
"cx": {
"type": "number"
},
"cy": {
"type": "number"
},
"tx": {
"type": "number"
},
"ty": {
"type": "number"
}
},
"required": [
"ax",
"ay",
"bx",
"by",
"cx",
"cy",
"tx",
"ty"
],
"additionalProperties": false
},
"output": {
"anyOf": [
{
"type": "number",
"const": -1
},
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
]
}
}