struct

Egui::Vec2

Inherits Struct < Value < Object

Constructors

new(x : Float64 = 0.0, y : Float64 = 0.0)
Source
zero
Source

Instance methods

*(s : Float64) : Vec2
Source
*(s : Int32) : Vec2
Source
+(other : Vec2) : Vec2
Source
-(other : Vec2) : Vec2
Source
/(s : Float64) : Vec2
Source
==(other : Vec2) : Bool
Source
inspect(io : IO) : Nil

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"
Source
length
Source
max(other : Vec2) : Vec2
Source
min(other : Vec2) : Vec2
Source
x=(x : Float64)
Source
y=(y : Float64)
Source