chris_lib 2.0.0 → 2.0.4

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: 55f439aa3d9c69f76fe0d8e71ca2792d54a86371403c24e48a8b364216f3d1f3
4
- data.tar.gz: aa416d12ca0916cf34d54985ad185e1bf4a49ed39befbc39b146f4c9002f1494
3
+ metadata.gz: 8b45dbc0752ee9fc958854c36c5fb37d68a2e87d7d575236f58dd4ae008951be
4
+ data.tar.gz: 00b55b5fe70a3277f68d596b2e8a0e66345e299e25f6b57bc09812da2ee5be99
5
5
  SHA512:
6
- metadata.gz: b08c41d77e18cd3cb849f65feab716370cf0a1d5ac91bdd9a0292c82fe76e0abfa18d352ac3222472b37584fb7fc1e2d25d8e5c37f5468f08b31a562f11cee53
7
- data.tar.gz: 17fffc4641e04f756ea8444fcc9e2234d83dc8f46c7c8c56a87fd70d73f320947e5ec1c65645ebb2e739a01736893038e2d453a0c76d41f5ad7274e8a953187f
6
+ metadata.gz: 64af2078226120ddcc5cb13958d37b67a4cf1bfbff3d387d87f3e849f71e8ddde6bd73b008e0cf88154b25ff93024813449e4b34afd0d1bcc4e4b95610070964
7
+ data.tar.gz: f846766e5724775c53901c10c8b081ac5ca035fea1a88e4e1c1ea1702493488b6a16781e7d53a98ba0810f758692f73b6a7f9ec8590db6473f665b45c65ef047
@@ -32,6 +32,11 @@ Matrix.class_eval do
32
32
  end
33
33
 
34
34
  Array.class_eval do
35
+ # round each element
36
+ def round(decimal_points = 0)
37
+ map { |e| e.round(decimal_points) }
38
+ end
39
+
35
40
  # mean of array
36
41
  def mean
37
42
  raise 'Length must be greater than 0.' if length < 1
@@ -1,3 +1,3 @@
1
1
  module ChrisLib
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chris_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-18 00:00:00.000000000 Z
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv