firefly-compiler 0.4.68 → 0.4.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/Float.ff CHANGED
@@ -36,112 +36,116 @@ extend self: Float {
36
36
  if(self <= from) {from} elseIf {self >= to} {to} else {self}
37
37
  }
38
38
 
39
- acos()
39
+ expDecay(that: Float, decay: Float, delta: Duration): Float {
40
+ that + (self - that) * (-decay * delta.seconds).exp()
41
+ }
42
+
43
+ acos(): Float
40
44
  target js sync """
41
45
  return Math.acos(self);
42
46
  """
43
47
 
44
- acosh()
48
+ acosh(): Float
45
49
  target js sync """
46
50
  return Math.acosh(self);
47
51
  """
48
52
 
49
- asin()
53
+ asin(): Float
50
54
  target js sync """
51
55
  return Math.asin(self);
52
56
  """
53
57
 
54
- asinh()
58
+ asinh(): Float
55
59
  target js sync """
56
60
  return Math.asinh(self);
57
61
  """
58
62
 
59
- atan()
63
+ atan(): Float
60
64
  target js sync """
61
65
  return Math.atan(self);
62
66
  """
63
67
 
64
- atan2(that: Float)
68
+ atan2(that: Float): Float
65
69
  target js sync """
66
70
  return Math.atan2(self, that);
67
71
  """
68
72
 
69
- atanh()
73
+ atanh(): Float
70
74
  target js sync """
71
75
  return Math.atanh(self);
72
76
  """
73
77
 
74
- cbrt()
78
+ cbrt(): Float
75
79
  target js sync """
76
80
  return Math.cbrt(self);
77
81
  """
78
82
 
79
- cos()
83
+ cos(): Float
80
84
  target js sync """
81
85
  return Math.cos(self);
82
86
  """
83
87
 
84
- cosh()
88
+ cosh(): Float
85
89
  target js sync """
86
90
  return Math.cosh(self);
87
91
  """
88
92
 
89
- exp()
93
+ exp(): Float
90
94
  target js sync """
91
95
  return Math.exp(self);
92
96
  """
93
97
 
94
- expm1()
98
+ expm1(): Float
95
99
  target js sync """
96
100
  return Math.expm1(self);
97
101
  """
98
102
 
99
- log(that: Float)
103
+ log(that: Float): Float
100
104
  target js sync """
101
105
  return Math.log2(self) / Math.log2(that);
102
106
  """
103
107
 
104
- log10()
108
+ log10(): Float
105
109
  target js sync """
106
110
  return Math.log10(self);
107
111
  """
108
112
 
109
- log2()
113
+ log2(): Float
110
114
  target js sync """
111
115
  return Math.log2(self);
112
116
  """
113
117
 
114
- ln()
118
+ ln(): Float
115
119
  target js sync """
116
120
  return Math.log(self);
117
121
  """
118
122
 
119
- ln1p()
123
+ ln1p(): Float
120
124
  target js sync """
121
125
  return Math.log1p(self);
122
126
  """
123
127
 
124
- sin()
128
+ sin(): Float
125
129
  target js sync """
126
130
  return Math.sin(self);
127
131
  """
128
132
 
129
- sinh()
133
+ sinh(): Float
130
134
  target js sync """
131
135
  return Math.sinh(self);
132
136
  """
133
137
 
134
- sqrt()
138
+ sqrt(): Float
135
139
  target js sync """
136
140
  return Math.sqrt(self);
137
141
  """
138
142
 
139
- tan()
143
+ tan(): Float
140
144
  target js sync """
141
145
  return Math.tan(self);
142
146
  """
143
147
 
144
- tanh()
148
+ tanh(): Float
145
149
  target js sync """
146
150
  return Math.tanh(self);
147
151
  """
@@ -235,6 +235,10 @@ return self_
235
235
  }
236
236
  }
237
237
 
238
+ export function Float_expDecay(self_, that_, decay_, delta_) {
239
+ return (that_ + ((self_ - that_) * ff_core_Float.Float_exp(((-decay_) * delta_))))
240
+ }
241
+
238
242
  export function Float_acos(self_) {
239
243
 
240
244
  return Math.acos(self);
@@ -417,6 +421,10 @@ return self_
417
421
  }
418
422
  }
419
423
 
424
+ export async function Float_expDecay$(self_, that_, decay_, delta_, $task) {
425
+ return (that_ + ((self_ - that_) * ff_core_Float.Float_exp(((-decay_) * delta_))))
426
+ }
427
+
420
428
  export async function Float_acos$(self_, $task) {
421
429
  throw new Error('Function Float_acos is missing on this target in async context.');
422
430
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.68",
7
+ "version": "0.4.69",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.68",
7
+ "version": "0.4.69",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"