diff options
| author | realtradam <[email protected]> | 2021-05-08 05:21:24 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-05-08 05:21:24 -0400 |
| commit | b1ac1abcdbe11c0bb465fe042eaba2ab9e012a5a (patch) | |
| tree | e10790fc1858649874f20ca36efd09cc3a07cfa0 /math_plus.rb | |
| parent | 625042cef2f11211ab4cae145ea5cf309994312e (diff) | |
| download | tileset-map-editor-b1ac1abcdbe11c0bb465fe042eaba2ab9e012a5a.tar.gz tileset-map-editor-b1ac1abcdbe11c0bb465fe042eaba2ab9e012a5a.zip | |
Diffstat (limited to 'math_plus.rb')
| -rw-r--r-- | math_plus.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/math_plus.rb b/math_plus.rb new file mode 100644 index 0000000..eac8d21 --- /dev/null +++ b/math_plus.rb @@ -0,0 +1,5 @@ +module MathPlus + def self.divisors_of(num) + (1..num).select { |n| (num % n).zero? } + end +end |
