struct V4L2::Fract

Overview

Represents a fractional value of two integers.

Defined in:

v4l2/fract.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(numerator : UInt32, denominator : UInt32) #

[View source]
def self.new(fract_struct : Linux::V4L2Fract) #

Initializes a V4L2::Fract from a Linux::V4L2Fract struct.


[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(numerator _numerator = @numerator, denominator _denominator = @denominator) #

[View source]
def denominator : UInt32 #

def numerator : UInt32 #

def to_f : Float #

Converts the fraction to a Float.


[View source]
def to_s : String #

Converts the fraction to a String.


[View source]
def to_unsafe : Linux::V4L2Fract #

Converts the fraction back into a Linux::V4L2Fract.


[View source]