Module: Math

Includes:
Hornetseye::Methods
Defined in:
docs/multiarray/lib/multiarray/complex.rb,
docs/multiarray/lib/multiarray/methods.rb,
docs/multiarray/lib/multiarray/rgb.rb

Overview

The Math module is extended with a few methods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.acosObject

.acos_without_internalcomplexObject

.acoshObject

.acosh_without_internalcomplexObject

.asinObject

.asin_without_internalcomplexObject

.asinhObject

.asinh_without_internalcomplexObject

.atanObject

.atan2Object

.atan2_without_internalcomplexObject

.atan_without_internalcomplexObject

.atanhObject

.atanh_without_internalcomplexObject

.cosObject

.cos_without_internalcomplexObject

.coshObject

.cosh_without_internalcomplexObject

.expObject

.exp_without_internalcomplexObject

.logObject

.log10Object

.log10_without_internalcomplexObject

.log_without_internalcomplexObject

.log_without_rgbObject

.sinObject

.sin_without_internalcomplexObject

.sinhObject

.sinh_without_internalcomplexObject

.sqrtObject

.sqrt_without_internalcomplexObject

.sqrt_without_rgbObject

.tanObject

.tan_without_internalcomplexObject

.tanhObject

.tanh_without_internalcomplexObject

Instance Method Details

#log_with_rgb(c) ⇒ Object



952
953
954
955
956
957
958
# File 'docs/multiarray/lib/multiarray/rgb.rb', line 952

def log_with_rgb(c)
  if c.is_a? Hornetseye::RGB
    Hornetseye::RGB.new log( c.r ), log( c.g ), log( c.b )
  else
    log_without_rgb c
  end
end

#sqrt_with_rgb(c) ⇒ Object



940
941
942
943
944
945
946
# File 'docs/multiarray/lib/multiarray/rgb.rb', line 940

def sqrt_with_rgb(c)
  if c.is_a? Hornetseye::RGB
    Hornetseye::RGB.new sqrt( c.r ), sqrt( c.g ), sqrt( c.b )
  else
    sqrt_without_rgb c
  end
end