vector2d 0.5.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/README.rdoc +37 -1
  2. data/Rakefile +1 -1
  3. data/VERSION +1 -1
  4. data/vector2d.gemspec +1 -1
  5. metadata +1 -1
data/README.rdoc CHANGED
@@ -1,9 +1,45 @@
1
- == Vector2d
1
+ = Vector2d
2
2
 
3
3
  Vector2d allows for easy handling of two-dimensionals coordinates and vectors.
4
4
  It's very flexible, most methods accepts arguments as strings, arrays, hashes
5
5
  or Vector2d objects.
6
6
 
7
+ == Installation
8
+
9
+ Install from RubyForge:
10
+
11
+ sudo gem install vector2d
12
+
13
+ Install from GitHub:
14
+
15
+ gem sources -a http://gems.github.com
16
+ sudo gem install elektronaut-vector2d
17
+
18
+ == Usage examples
19
+
20
+ require 'vector2d'
21
+
22
+ # These are equal
23
+ v = Vector2d.new(50, 70)
24
+ v = Vector2d.new('50x70')
25
+
26
+ v.aspect_ratio # => 0.714285714285714
27
+ v.length # => 86.0232526704263
28
+
29
+ # Calculations work as expected
30
+ v * 2 # => #<Vector2d:0x5d994 @y=140.0, @x=100.0>
31
+ v + Vector2d.new(20,30) # => #<Vector2d:0x59c54 @y=100.0, @x=70.0>
32
+
33
+ v.constrain_both(64, 64) # => #<Vector2d:0x47e28 @y=64.0, @x=45.7142857142857>
34
+
35
+ == API Documentation
36
+
37
+ Is available at http://vector2d.rubyforge.org/
38
+
39
+ == Source code
40
+
41
+ Is available at http://github.com/elektronaut/vector2d
42
+
7
43
  == Licence
8
44
 
9
45
  (The MIT License)
data/Rakefile CHANGED
@@ -52,7 +52,7 @@ begin
52
52
  )
53
53
 
54
54
  host = "#{config['username']}@rubyforge.org"
55
- remote_dir = "/var/www/gforge-projects/the-perfect-gem/"
55
+ remote_dir = "/var/www/gforge-projects/vector2d/"
56
56
  local_dir = 'rdoc'
57
57
 
58
58
  Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 1.0.0
data/vector2d.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{vector2d}
5
- s.version = "0.5.2"
5
+ s.version = "1.0.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Inge J\303\270rgensen"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vector2d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Inge J\xC3\xB8rgensen"