Class: AppMath::ArcCos

Inherits:
Object
  • Object
show all
Defined in:
lib/graph.rb

Instance Method Summary collapse

Constructor Details

#initialize(n = R.prec) ⇒ ArcCos

Returns a new instance of ArcCos.



367
368
369
370
# File 'lib/graph.rb', line 367

def initialize(n = R.prec)
  @precMem = R.prec
  @precLoc = n
end

Instance Method Details

#at(x) ⇒ Object



371
372
373
374
375
# File 'lib/graph.rb', line 371

def at(x)
  R.prec = @precLoc
  y = R.c(x).acos
  R.prec = @precMem; y
end