public
Fork of jacius/rubygame
Description: Flexible game creation library for Ruby
Homepage: http://rubygame.sourceforge.net
Clone URL: git://github.com/atiaxi/rubygame.git
Fixed the new_from_to bug
atiaxi (author)
Mon Aug 18 10:10:46 -0700 2008
commit  6f2a24518fcce32d7dc71c014226a157bc993382
tree    1f041793b5cc4cad07315c5d99c335dbdb5f7cfd
parent  fc9d8cf4767396a831e37d9d31d136e11c0beb6e
...
80
81
82
83
 
84
85
86
...
92
93
94
95
 
96
97
98
...
80
81
82
 
83
84
85
86
...
92
93
94
 
95
96
97
98
0
@@ -80,7 +80,7 @@ class Ftor
0
   # Create a new Ftor by specifying its #angle (in radians) and #magnitude.
0
   # See also #new.
0
   def self.new_am(a,m)
0
-    v = Ftor.new(1,0)
0
+    v = self.new(1,0)
0
     v.a, v.m = a, m
0
     return v
0
   end
0
@@ -92,7 +92,7 @@ class Ftor
0
   # In other words, assuming +v+ is the Ftor returned by this function:
0
   #   p1 + v = p2
0
   def self.new_from_to(p1,p2)
0
-    return self.class.new(p2[0]-p1[0],p2[1]-p1[1])
0
+    return self.new(p2[0]-p1[0],p2[1]-p1[1])
0
   end
0
 
0
   attr_reader :x                # The x component of the Ftor.

Comments