class Gsw::Vector

Defined in:

gsw/core/vector.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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

[View source]
def self.new #

[View source]

Class Method Detail

def self.distance(v1 : Vector, v2 : Vector) #

[View source]

Instance Method Detail

def *(other : Int32 | Float32 | Float64) #

[View source]
def *(other : Vector) #

[View source]
def +(other : Int32 | Float32 | Float64) #

[View source]
def +(other : Vector) #

[View source]
def -(other : Int32 | Float32 | Float64) #

[View source]
def -(other : Vector) #

[View source]
def /(other : Int32 | Float32 | Float64) #

[View source]
def /(other : Vector) #

[View source]
def distance(other : Vector) #

[View source]
def height(other : Vector) #

[View source]
def length #

[View source]
def normalize #

[View source]
def to_s(io : IO) #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]
def width(other : Vector) #

[View source]
def x : Int32 | Float32 | Float64 #

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

[View source]
def y : Int32 | Float32 | Float64 #

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

[View source]