Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed the new_from_to bug
  • Loading branch information
atiaxi committed Aug 18, 2008
1 parent fc9d8cf commit 6f2a245
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rubygame/ftor.rb
Expand Up @@ -80,7 +80,7 @@ def initialize(x,y)
# Create a new Ftor by specifying its #angle (in radians) and #magnitude.
# See also #new.
def self.new_am(a,m)
v = Ftor.new(1,0)
v = self.new(1,0)
v.a, v.m = a, m
return v
end
Expand All @@ -92,7 +92,7 @@ def self.new_am(a,m)
# In other words, assuming +v+ is the Ftor returned by this function:
# p1 + v = p2
def self.new_from_to(p1,p2)
return self.class.new(p2[0]-p1[0],p2[1]-p1[1])
return self.new(p2[0]-p1[0],p2[1]-p1[1])
end

attr_reader :x # The x component of the Ftor.
Expand Down

0 comments on commit 6f2a245

Please sign in to comment.