Class: AppMath::Cos
- Inherits:
-
Object
- Object
- AppMath::Cos
- Defined in:
- lib/graph.rb
Instance Method Summary collapse
- #at(x) ⇒ Object
-
#initialize(n = R.prec) ⇒ Cos
constructor
A new instance of Cos.
Constructor Details
#initialize(n = R.prec) ⇒ Cos
Returns a new instance of Cos.
307 308 309 310 |
# File 'lib/graph.rb', line 307 def initialize(n = R.prec) @precMem = R.prec @precLoc = n end |
Instance Method Details
#at(x) ⇒ Object
311 312 313 314 315 |
# File 'lib/graph.rb', line 311 def at(x) R.prec = @precLoc y = R.c(x).cos R.prec = @precMem; y end |