struct Graphene::Vec2

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.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

[View source]
def self.new(data : LibGraphene::Vec2, _transfer : GICrystal::Transfer) #

[View source]
def self.new(value : Graphene::Simd4F | Nil = nil) #

[View source]

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


[View source]
def self.one : Graphene::Vec2 #

[View source]
def self.x_axis : Graphene::Vec2 #

[View source]
def self.y_axis : Graphene::Vec2 #

[View source]
def self.zero : Graphene::Vec2 #

[View source]

Instance Method Detail

def ==(other : self) : Bool #

[View source]

[View source]
def divide(b : Graphene::Vec2) : Graphene::Vec2 #

[View source]
def dot(b : Graphene::Vec2) : Float32 #

[View source]
def equal(v2 : Graphene::Vec2) : Bool #

[View source]
def free : Nil #

[View source]
def init(x : Float32, y : Float32) : Graphene::Vec2 #

[View source]
def init_from_float(src : Enumerable(Float32)) : Graphene::Vec2 #

[View source]
def init_from_float(*src : Float32) #

[View source]
def init_from_vec2(src : Graphene::Vec2) : Graphene::Vec2 #

[View source]
def interpolate(v2 : Graphene::Vec2, factor : Float64) : Graphene::Vec2 #

[View source]
def length : Float32 #

[View source]

[View source]

[View source]
def multiply(b : Graphene::Vec2) : Graphene::Vec2 #

[View source]
def near(v2 : Graphene::Vec2, epsilon : Float32) : Bool #

[View source]
def negate : Graphene::Vec2 #

[View source]
def normalize : Graphene::Vec2 #

[View source]
def scale(factor : Float32) : Graphene::Vec2 #

[View source]
def subtract(b : Graphene::Vec2) : Graphene::Vec2 #

[View source]
def to_float(dest : Enumerable(Float32)) : Nil #

[View source]
def to_float(*dest : Float32) #

[View source]
def value(*args, **options) #

[View source]
def value(*args, **options, &) #

[View source]
def value=(arg) #

[View source]
def x : Float32 #

[View source]
def y : Float32 #

[View source]