rays 0.1.35 → 0.1.36

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4c0a9bd392890b6050222bbe909e202d90b80dcf3b6d07f1224b8a8f45e6ba6
4
- data.tar.gz: 3d9b9704530696f6c7296d37e8d29ce919f106660863c8c9d210ae02782dcef2
3
+ metadata.gz: 1fea01d7f445829ba6e0adbabf088889bff2d7e9a70b4e074a8c43ba67b76893
4
+ data.tar.gz: db621dcf505e0fc0f9a0b667c36c6d3dd10de1c77c315b1a85cc6d0c524fc64f
5
5
  SHA512:
6
- metadata.gz: 34f4aa49334b92fa3db3e29144b5ec3f5e4c5cc912bf8aed3bfe669abb4c4e804b247504a21b7746e25b17109f47070c790b008c10d857417d413100be741a3d
7
- data.tar.gz: dda95d6094c89909d623c7910fb5033a1fae0ec4a254076d6b77afc8cc2c595b58d014876c488f312dcc605bf445a25f04fdfd5d24f1e4a3a2b90d7259742630
6
+ metadata.gz: 9692697c5347e009ea5b2bb0ff461d246c49aab916d2c53a67a8ba64d5d35968d6faf1c8e5c0eb76214ac8a066581a9c136e13cc651ac62d9ad668052969a36a
7
+ data.tar.gz: d69dac60890ae4208b73d174f0c69136cac2ff14ce34402ea5f3a6500dd8f80e115d881bbe50f0d5311d2ef0ab2f3f9de382a5775a111662dfc2233239974af6
data/ChangeLog.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # rays ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.36] - 2023-05-11
5
+
6
+ - Fix a few minor problems
7
+
8
+
4
9
  ## [v0.1.35] - 2023-05-08
5
10
 
6
11
  - Update dependencies
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.35
1
+ 0.1.36
@@ -83,6 +83,10 @@ namespace Rays
83
83
 
84
84
  This operator * (const This& rhs) const;
85
85
 
86
+ friend bool operator == (const This& lhs, const This& rhs);
87
+
88
+ friend bool operator != (const This& lhs, const This& rhs);
89
+
86
90
  };// Matrix
87
91
 
88
92
 
data/lib/rays/point.rb CHANGED
@@ -40,6 +40,7 @@ module Rays
40
40
  end
41
41
 
42
42
  def <=>(o)
43
+ return nil unless o
43
44
  ret = x <=> o.x; return ret if ret != 0
44
45
  ret = y <=> o.y; return ret if ret != 0
45
46
  z <=> o.z
data/src/matrix.cpp CHANGED
@@ -172,5 +172,17 @@ namespace Rays
172
172
  return to_rays(to_glm(*this) * to_glm(rhs));
173
173
  }
174
174
 
175
+ bool
176
+ operator == (const Matrix& lhs, const Matrix& rhs)
177
+ {
178
+ return to_glm(lhs) == to_glm(rhs);
179
+ }
180
+
181
+ bool
182
+ operator != (const Matrix& lhs, const Matrix& rhs)
183
+ {
184
+ return to_glm(lhs) != to_glm(rhs);
185
+ }
186
+
175
187
 
176
188
  }// Rays
data/test/test_point.rb CHANGED
@@ -152,6 +152,11 @@ class TestPoint < Test::Unit::TestCase
152
152
  assert o > point(0, 2, 3)
153
153
  assert o > point(1, 1, 3)
154
154
  assert o > point(1, 2, 2)
155
+
156
+ assert_not o == nil
157
+ assert o != nil
158
+ assert_raise {o < nil}
159
+ assert_raise {o > nil}
155
160
  end
156
161
 
157
162
  def test_negate()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rays
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.35
4
+ version: 0.1.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-08 00:00:00.000000000 Z
11
+ date: 2023-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xot