shawn42 / gamebox

A game template for building and distributing Gosu apps.
267 stars 29 forks source link

Update to vector2.rb #105

Closed mrwormhole closed 5 years ago

mrwormhole commented 5 years ago

Bug has been found and fixed after few unit tests which is related to == operation. I also have observed MinMaxHelpers are obsolute in latest ruby versions and didn't remove it yet. I have also learnt usage of hash function and tested to work it out but it apparently doesn't really work so i suggest it to delete @hash variable and hash function for usability. Here is where i have seen from https://ruby-doc.org/core-2.5.3/Hash.html "A user-defined class may be used as a hash key if the hash and eql? methods are overridden to provide meaningful behavior. By default, separate instances refer to separate hash keys."