Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1var PointD = require('./PointD');
2
3function Transform(x, y) {
4 this.lworldOrgX = 0.0;
5 this.lworldOrgY = 0.0;
6 this.ldeviceOrgX = 0.0;
7 this.ldeviceOrgY = 0.0;
8 this.lworldExtX = 1.0;
9 this.lworldExtY = 1.0;
10 this.ldeviceExtX = 1.0;
11 this.ldeviceExtY = 1.0;
12}
13
14Transform.prototype.getWorldOrgX = function ()
15{
16 return this.lworldOrgX;
17}
18
19Transform.prototype.setWorldOrgX = function (wox)
20{
21 this.lworldOrgX = wox;
22}
23
24Transform.prototype.getWorldOrgY = function ()
25{
26 return this.lworldOrgY;
27}
28
29Transform.prototype.setWorldOrgY = function (woy)
30{
31 this.lworldOrgY = woy;
32}
33
34Transform.prototype.getWorldExtX = function ()
35{
36 return this.lworldExtX;
37}
38
39Transform.prototype.setWorldExtX = function (wex)
40{
41 this.lworldExtX = wex;
42}
43
44Transform.prototype.getWorldExtY = function ()
45{
46 return this.lworldExtY;
47}
48
49Transform.prototype.setWorldExtY = function (wey)
50{
51 this.lworldExtY = wey;
52}
53
54/* Device related */
55
56Transform.prototype.getDeviceOrgX = function ()
57{
58 return this.ldeviceOrgX;
59}
60
61Transform.prototype.setDeviceOrgX = function (dox)
62{
63 this.ldeviceOrgX = dox;
64}
65
66Transform.prototype.getDeviceOrgY = function ()
67{
68 return this.ldeviceOrgY;
69}
70
71Transform.prototype.setDeviceOrgY = function (doy)
72{
73 this.ldeviceOrgY = doy;
74}
75
76Transform.prototype.getDeviceExtX = function ()
77{
78 return this.ldeviceExtX;
79}
80
81Transform.prototype.setDeviceExtX = function (dex)
82{
83 this.ldeviceExtX = dex;
84}
85
86Transform.prototype.getDeviceExtY = function ()
87{
88 return this.ldeviceExtY;
89}
90
91Transform.prototype.setDeviceExtY = function (dey)
92{
93 this.ldeviceExtY = dey;
94}
95
96Transform.prototype.transformX = function (x)
97{
98 var xDevice = 0.0;
99 var worldExtX = this.lworldExtX;
100 if (worldExtX != 0.0)
101 {
102 xDevice = this.ldeviceOrgX +
103 ((x - this.lworldOrgX) * this.ldeviceExtX / worldExtX);
104 }
105
106 return xDevice;
107}
108
109Transform.prototype.transformY = function (y)
110{
111 var yDevice = 0.0;
112 var worldExtY = this.lworldExtY;
113 if (worldExtY != 0.0)
114 {
115 yDevice = this.ldeviceOrgY +
116 ((y - this.lworldOrgY) * this.ldeviceExtY / worldExtY);
117 }
118
119
120 return yDevice;
121}
122
123Transform.prototype.inverseTransformX = function (x)
124{
125 var xWorld = 0.0;
126 var deviceExtX = this.ldeviceExtX;
127 if (deviceExtX != 0.0)
128 {
129 xWorld = this.lworldOrgX +
130 ((x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX);
131 }
132
133
134 return xWorld;
135}
136
137Transform.prototype.inverseTransformY = function (y)
138{
139 var yWorld = 0.0;
140 var deviceExtY = this.ldeviceExtY;
141 if (deviceExtY != 0.0)
142 {
143 yWorld = this.lworldOrgY +
144 ((y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY);
145 }
146 return yWorld;
147}
148
149Transform.prototype.inverseTransformPoint = function (inPoint)
150{
151 var outPoint =
152 new PointD(this.inverseTransformX(inPoint.x),
153 this.inverseTransformY(inPoint.y));
154 return outPoint;
155}
156
157module.exports = Transform;
158 