struct Graphene::Vec2
- Graphene::Vec2
- Struct
- Value
- Object
Overview
A structure capable of holding a vector with two dimensions, x and y.
The contents of the #graphene_::vec2_t structure are private and should never be accessed directly.
Defined in:
lib/gi-crystal/src/auto/graphene-1.0/vec2.crConstructors
- .new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
- .new(data : LibGraphene::Vec2, _transfer : GICrystal::Transfer)
- .new(value : Graphene::Simd4F | Nil = nil)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
- .one : Graphene::Vec2
- .x_axis : Graphene::Vec2
- .y_axis : Graphene::Vec2
- .zero : Graphene::Vec2
Instance Method Summary
- #==(other : self) : Bool
- #add(b : Graphene::Vec2) : Graphene::Vec2
- #divide(b : Graphene::Vec2) : Graphene::Vec2
- #dot(b : Graphene::Vec2) : Float32
- #equal(v2 : Graphene::Vec2) : Bool
- #free : Nil
- #init(x : Float32, y : Float32) : Graphene::Vec2
- #init_from_float(src : Enumerable(Float32)) : Graphene::Vec2
- #init_from_float(*src : Float32)
- #init_from_vec2(src : Graphene::Vec2) : Graphene::Vec2
- #interpolate(v2 : Graphene::Vec2, factor : Float64) : Graphene::Vec2
- #length : Float32
- #max(b : Graphene::Vec2) : Graphene::Vec2
- #min(b : Graphene::Vec2) : Graphene::Vec2
- #multiply(b : Graphene::Vec2) : Graphene::Vec2
- #near(v2 : Graphene::Vec2, epsilon : Float32) : Bool
- #negate : Graphene::Vec2
- #normalize : Graphene::Vec2
- #scale(factor : Float32) : Graphene::Vec2
- #subtract(b : Graphene::Vec2) : Graphene::Vec2
- #to_float(dest : Enumerable(Float32)) : Nil
- #to_float(*dest : Float32)
- #value(*args, **options)
- #value(*args, **options, &)
- #value=(arg)
- #x : Float32
- #y : Float32
Constructor Detail
Class Method Detail
Returns the type id (GType) registered in GLib type system.