module ColorUtil::Helpers
Extended Modules
Defined in:
colorutil/helpers.crInstance Method Summary
-
#interpolate(a, b, rise)
Interpolates two values.
- #norm(tensor : Tensor(Float64)) : Float64
-
#peel_matrix(tensor : Tensor(Float64)) : Array(Array(Float64))
Given a tensor of rank 2, return the same data structure as a 2D float array.
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.
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.