struct Vector2

Included Modules

Extended Modules

Defined in:

engine/aabb.cr
engine/vector2.cr
gui/general.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(x : Float64, y : Float64) #

[View source]
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]

Class Method Detail

def self.from_angle(angle, length) #

[View source]
def self.use_fast_cannon? #

Magic method to mark this structure as being fast en-/decodable.


[View source]
def self.zero #

[View source]

Instance Method Detail

def *(scale : Number) #

[View source]
def +(other) #

[View source]
def -(other) #

[View source]
def - #

[View source]
def /(scale : Number) #

[View source]
def /(scale) #

[View source]
def abs #

[View source]
def angle #

[View source]
def clone #

[View source]
def close(other, eps = 1.0) #

[View source]
def copy_with(x _x = @x, y _y = @y) #

[View source]
def cross(other) #

[View source]
def dot(other) #

[View source]
def inside?(aabb) #

[View source]
def inspect(io) #

[View source]
def length #

[View source]
def max #

[View source]
def min #

[View source]
def normalize #

[View source]
def rotate(angle) #

[View source]
def scale(other) #

[View source]
def sqrlength #

[View source]
def to_i #

[View source]
def x : Float64 #

def y : Float64 #