class CSG::Vector2D

Overview

Represents a 2D vector.

Defined in:

primitives/vector2d.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(x = 0, y = 0) #

[View source]

Instance Method Detail

def !=(a : Vector) : Bool #

[View source]
def ==(a : Vector) : Bool #

[View source]
def clone #

[View source]
def cross(a : Vector) #

[View source]
def div(a : Float64) #

[View source]
def dot(a : Vector) #

[View source]
def length #

[View source]
def lerp(a : Vector, t : Float64) #

[View source]
def minus(a : Vector) #

[View source]
def negated #

[View source]
def plus(a : Vector) #

[View source]
def times(a : Float64) #

[View source]
def to_s : String #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def unit #

[View source]
def x : Float64 #

[View source]
def x=(x : Float64) #

[View source]
def y : Float64 #

[View source]
def y=(y : Float64) #

[View source]