numerix 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/ext/numerix/common.h +4 -0
- data/ext/numerix/matrix3x2.c +0 -2
- data/ext/numerix/vector.c +2 -2
- data/lib/numerix.rb +1 -0
- data/lib/numerix/version.rb +1 -1
- data/numerix.gemspec +2 -1
- metadata +4 -4
- data/TODO.txt +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5b5370fbec3e2235fbdee76d9be6e776e60215d
|
4
|
+
data.tar.gz: cf38d0e5d2e9903af8d76a8035982271191b027c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d19e9becfcc9f08d687828c347293fc81a7939ccf0cdc6a309a6b7ea24a63f4a52d970461a2e499da5e73362fb478674aac6b0832840ff9b819104074798b154
|
7
|
+
data.tar.gz: f2b6b4dc6eee4bbb845b86f52679cc249dc7a42fecd25e4083b412274d2440adedf2e5c3bb8577bc3e988d50c1aecbf3b76b41690dd562077dfcf0d0bb056e26
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## Version 1.0.1
|
4
|
+
|
5
|
+
### Bugfixes
|
6
|
+
|
7
|
+
* Fixed build error caused by missing definition for `FLT_EPSILON` on some compilers
|
8
|
+
* Fixed build error caused by different pointer types between `int` and `long`
|
9
|
+
|
10
|
+
## Version 1.0.0
|
11
|
+
|
12
|
+
* Initial Release
|
data/ext/numerix/common.h
CHANGED
@@ -18,6 +18,10 @@
|
|
18
18
|
|
19
19
|
#define CLASS_NAME(obj) rb_class2name(CLASS_OF(obj))
|
20
20
|
|
21
|
+
#ifndef FLT_EPSILON
|
22
|
+
#define FLT_EPSILON 1.19209290E-07F
|
23
|
+
#endif
|
24
|
+
|
21
25
|
#define FLT_EQUAL(a, b) fabsf(a - b) < FLT_EPSILON
|
22
26
|
|
23
27
|
#define PRIVATE_CLASS_METHOD(klass, methodName) rb_funcall(klass, rb_intern("private_class_method"), 1, ID2SYM(rb_intern(methodName)))
|
data/ext/numerix/matrix3x2.c
CHANGED
@@ -277,7 +277,6 @@ VALUE rb_matrix3x2_column(VALUE self, VALUE column) {
|
|
277
277
|
|
278
278
|
VALUE rb_matrix3x2_map(VALUE self) {
|
279
279
|
const int count = 6;
|
280
|
-
RETURN_SIZED_ENUMERATOR(self, 0, 0, count);
|
281
280
|
|
282
281
|
struct RData *rdata = RDATA(self);
|
283
282
|
float *flt = (float *)rdata->data;
|
@@ -291,7 +290,6 @@ VALUE rb_matrix3x2_map(VALUE self) {
|
|
291
290
|
|
292
291
|
VALUE rb_matrix3x2_map_bang(VALUE self) {
|
293
292
|
const int count = 6;
|
294
|
-
RETURN_SIZED_ENUMERATOR(self, 0, 0, count);
|
295
293
|
|
296
294
|
float *flt = (float *)RDATA(self)->data;
|
297
295
|
for (int i = 0; i < count; i++)
|
data/ext/numerix/vector.c
CHANGED
@@ -230,7 +230,7 @@ VALUE rb_basic_vector_address(VALUE self) {
|
|
230
230
|
#if (SIZEOF_INTPTR_T == 4)
|
231
231
|
return LONG2NUM((long)v->values);
|
232
232
|
#elif (SIZEOF_INTPTR_T == 8)
|
233
|
-
return LL2NUM((long long)v->values)
|
233
|
+
return LL2NUM((long long)v->values);
|
234
234
|
#else
|
235
235
|
return INT2NUM(0);
|
236
236
|
#endif
|
@@ -262,7 +262,7 @@ VALUE rb_basic_vector_aset(VALUE self, VALUE index, VALUE value) {
|
|
262
262
|
|
263
263
|
VALUE rb_basic_vector_each(VALUE self) {
|
264
264
|
BASIC_VECTOR();
|
265
|
-
int count = v->count;
|
265
|
+
long int count = v->count;
|
266
266
|
|
267
267
|
volatile VALUE vector = self;
|
268
268
|
RETURN_SIZED_ENUMERATOR(vector, 0, 0, count);
|
data/lib/numerix.rb
CHANGED
data/lib/numerix/version.rb
CHANGED
data/numerix.gemspec
CHANGED
@@ -8,7 +8,6 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Numerix::VERSION
|
9
9
|
spec.authors = ["Eric Freed"]
|
10
10
|
spec.email = ["efreed09@gmail.com"]
|
11
|
-
|
12
11
|
spec.summary = %q{High performance vector and matrix C extension for fast vector math and simplified interop.}
|
13
12
|
spec.description = %q{Numerix strives to make working with vectors more "Ruby-like", and far exceeds Ruby's built-in implementations many times over in regards to speed and performance. Great care has been take to make the library "interop" friendly, where each class can easily be passed as a "pointer" or binary string for interop with native libraries, using Ruby's Fiddle, FFI, or even Ruby's legacy Win32API. Numerix has been built from the ground-up for Ruby, not playing middle-man between Ruby and an existing library, and is optimized specifically for it, with focus on speed and a robust collection of functionality. }
|
14
13
|
spec.homepage = "https://github.com/ForeverZer0/numerix"
|
@@ -23,6 +22,8 @@ Gem::Specification.new do |spec|
|
|
23
22
|
spec.require_paths = ["lib"]
|
24
23
|
spec.extensions = ["ext/numerix/extconf.rb"]
|
25
24
|
|
25
|
+
spec.required_ruby_version = '>= 1.8.7'
|
26
|
+
|
26
27
|
spec.add_development_dependency "bundler", "~> 1.16"
|
27
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
28
29
|
spec.add_development_dependency "rake-compiler", '~> 0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numerix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Freed
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,12 +84,12 @@ files:
|
|
84
84
|
- ".gitignore"
|
85
85
|
- ".travis.yml"
|
86
86
|
- ".yardopts"
|
87
|
+
- CHANGELOG.md
|
87
88
|
- CODE_OF_CONDUCT.md
|
88
89
|
- Gemfile
|
89
90
|
- LICENSE.txt
|
90
91
|
- README.md
|
91
92
|
- Rakefile
|
92
|
-
- TODO.txt
|
93
93
|
- bin/console
|
94
94
|
- bin/setup
|
95
95
|
- ext/numerix/common.h
|
@@ -151,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
151
|
requirements:
|
152
152
|
- - ">="
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version:
|
154
|
+
version: 1.8.7
|
155
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
data/TODO.txt
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
fix equality checking (consistent)
|
4
|
-
|
5
|
-
|
6
|
-
coerce Ruby Vector, Matrix, Pointer, etc
|
7
|
-
|
8
|
-
|
9
|
-
DOCUMENTE ** function in matrix classes !!!!!!!!!!!
|
10
|
-
|
11
|
-
MOVE ** from VectorBase to individual vector classes and document
|
12
|
-
|
13
|
-
[equiv, self]
|
14
|
-
|
15
|
-
|
16
|
-
RANGE ERRORS IN MATRIX CLASS(ES)
|
17
|
-
|
18
|
-
|
19
|
-
//////////////// PLANE /////////////////////////////
|
20
|
-
// to_a, to_h
|
21
|
-
// to_vec4
|
22
|
-
// normalize, !
|
23
|
-
// dot
|
24
|
-
// dot_coord
|
25
|
-
// dot_normal
|