struct

Egui::Pos2

Inherits Struct < Value < Object

Constructors

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

Instance methods

+(v : Vec2) : Pos2
Source
-(v : Vec2) : Pos2
Source
-(other : Pos2) : Vec2
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
to_vec2
Source
x=(x : Float64)
Source
y=(y : Float64)
Source