module ColorUtil::Helpers

Extended Modules

Defined in:

colorutil/helpers.cr

Instance Method Summary

Instance Method Detail

def interpolate(a, b, rise) #

Interpolates two values. If rise is zero, this returns a. If rise is one, this returns b. For any value in between, this returns the weighted average of the two.


[View source]
def norm(tensor : Tensor(Float64)) : Float64 #

[View source]
def peel_matrix(tensor : Tensor(Float64)) : Array(Array(Float64)) #

Given a tensor of rank 2, return the same data structure as a 2D float array.


[View source]