kgl 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +2 -2
- data/lib/kgl/version.rb +1 -1
- data/lib/kgl.rb +16 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc114cb34920ec7950a6874a45e45cc62ffcc6451adeb30382ed64d892b265c
|
4
|
+
data.tar.gz: e06a04ee09a85dec8c6a68c08cf226955f1ed0d73f4bcb59d9cf64634a824481
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 919d930965c4975a63f0421195eaa0b1125b0f6e3142cca2fc2c4b077353876076dc82d5c4858be623235f4a8d06fb4dfeef034f0ee70c83e87341134ce2ea4f
|
7
|
+
data.tar.gz: e72edc905d3658ab0b90993c5f8a868579b1aa8e6790db2ca711ae41f7ff21d6263f1f904018230be715b303e10a5eebbf4c3621fd0e826ed380aa64b5e831f1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -22,13 +22,13 @@ An alias of original `Math.#log`. It returns the natural logarithm of `anti_loga
|
|
22
22
|
### `Math.#log(base, anti_logarithm=base.tap{base=Math::E})`
|
23
23
|
Returns the logarithm of `anti_logarithm` to base `base`.
|
24
24
|
|
25
|
-
### `Math.#lg(anti_logarithm)
|
25
|
+
### `Math.#lg(anti_logarithm)`
|
26
26
|
Returns the logarithm of `anti_logarithm` to base 2.
|
27
27
|
|
28
28
|
### `Float#to_r`, `String#to_r`
|
29
29
|
Returns `Rational` value of `self`.
|
30
30
|
|
31
|
-
### `Integer#to_msm(fps=
|
31
|
+
### `Integer#to_msm(fps=59.94)`
|
32
32
|
Returns `"[minutes]:[seconds].[milliseconds]"` which corresponds to `self` frames.
|
33
33
|
The submilliseconds will be rounded. `fps` is frames per second.
|
34
34
|
|
data/lib/kgl/version.rb
CHANGED
data/lib/kgl.rb
CHANGED
@@ -3,10 +3,25 @@ require "kgl/suu"
|
|
3
3
|
require "kgl/kmath"
|
4
4
|
|
5
5
|
class Integer
|
6
|
-
def to_msm(fps=
|
6
|
+
def to_msm(fps=59.94)
|
7
7
|
s, f = divmod(fps)
|
8
8
|
ms = (f*1000).quo(fps).round
|
9
9
|
m, s = s.divmod(60)
|
10
10
|
%Q|#{m}:#{s}.#{ms}|
|
11
11
|
end
|
12
12
|
end
|
13
|
+
|
14
|
+
module Kgl
|
15
|
+
module_function def rpw(n, sym='!#$%&*+,-./:;<=>?@')
|
16
|
+
ls = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' + sym
|
17
|
+
m = ls.length
|
18
|
+
`openssl rand #{n}`.bytes.map do |i|
|
19
|
+
while m <= i
|
20
|
+
i = `openssl rand 1`.bytes[0]
|
21
|
+
end
|
22
|
+
ls[i]
|
23
|
+
end.join
|
24
|
+
rescue Errno::ENOENT => e
|
25
|
+
raise 'Kgl.#rpw requires openssl command'
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kgl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KAZOON
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.12.2
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email:
|
57
57
|
- cycloawaodorin+gem@gmail.com
|
58
58
|
executables: []
|
@@ -81,7 +81,7 @@ metadata:
|
|
81
81
|
homepage_uri: https://github.com/cycloawaodorin/
|
82
82
|
source_code_uri: https://github.com/cycloawaodorin/kgl
|
83
83
|
changelog_uri: https://github.com/cycloawaodorin/kgl/blob/master/CHANGELOG.md
|
84
|
-
post_install_message:
|
84
|
+
post_install_message:
|
85
85
|
rdoc_options: []
|
86
86
|
require_paths:
|
87
87
|
- lib
|
@@ -96,8 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
|
-
rubygems_version: 3.
|
100
|
-
signing_key:
|
99
|
+
rubygems_version: 3.5.23
|
100
|
+
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: A gem for personal use.
|
103
103
|
test_files: []
|