mk_coord 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: b85b6046e018cee39c7a7217879a017faa8fe0b3
4
- data.tar.gz: eba78c8c3354b7e6fc31179ebd22964aae834a41
3
+ metadata.gz: 51ba7698c095b01a13ceecbaea6b21eaf830b926
4
+ data.tar.gz: 6f4bab918f6f87d2921c40e11ad93f96d9d88390
5
5
  SHA512:
6
- metadata.gz: 62b7088f464de75ad990b65550192b39ed649223d4ca424a2fcf2dadcd41d1f7085f109059b6ffc2f906fb9e0c4154ef87fa4245086d88c163f6bd2cf8e6d4b3
7
- data.tar.gz: 2f2df4bcc02922539f4969c6ed94f95b50b7102afceeb2806ade0e2f925eb28444f3bc8fd5d5e44bdd732a5f81f2c1b342ad93231026ab62a752a99caf1406a3
6
+ metadata.gz: f8fb75e5c482491702e652b9a265f9f27cfa85920791bec1640e3670de030cc44ebe47706cf6ff7c17ed6e884312f4396ad19dfc44b393cc3f76852ca5d5944b
7
+ data.tar.gz: 4a75045a5235633e7698b7d65a16790c65eb51b6cdf61218e74ae3f633835a07853d9082ec2f44de51e08a5985eda01925b9b6ce6b82f83d2c016b6289af447f
data/README.md CHANGED
@@ -7,13 +7,13 @@ This is the gem library which converts coordinates.
7
7
  ## Computable items
8
8
 
9
9
  * Rectangular position:
10
- - Equator coordinates -> Ecliptic coordinates
11
- - Ecliptic coordinates -> Equator coordinates
10
+ - Equator coordinates -> Ecliptic coordinates (x, y, z)
11
+ - Ecliptic coordinates -> Equator coordinates (x, y, z)
12
12
  * Polar position:
13
- - Equator coordinates -> Ecliptic coordinates
14
- - Ecliptic coordinates -> Equator coordinates
15
- * Rectangular coordinates -> Polar coordinates
16
- * Polar coordinates -> Rectangular coordinates
13
+ - Equator coordinates -> Ecliptic coordinates (lambda, beta)
14
+ - Ecliptic coordinates -> Equator coordinates (alpha, delta)
15
+ * Rectangular coordinates -> Polar coordinates (lambda, phi, r)
16
+ * Polar coordinates -> Rectangular coordinates (x, y, z)
17
17
 
18
18
  ## Installation
19
19
 
@@ -43,7 +43,8 @@ module MkCoord
43
43
  lambda = Math.atan2(y, x)
44
44
  phi = Math.atan2(z, r)
45
45
  lambda %= PI2 if lambda < 0
46
- return [lambda, phi, r]
46
+ d = Math.sqrt(x * x + y * y + z * z)
47
+ return [lambda, phi, d]
47
48
  rescue => e
48
49
  raise
49
50
  end
@@ -1,3 +1,3 @@
1
1
  module MkCoord
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mk_coord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - komasaru