w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
to_r

rat.to_r â self Instance Public methods Returns self. Rational(2).to_r #=> (2/1) Rational(-8, 6).to_r #=> (-4/3)

to_s

rat.to_s â string Instance Public methods Returns the value as a string. Rational(2).to_s #=> "2/1" Rational(-8, 6).to_s #=> "-4/3" Rational('1/2').to_s #=> "1/2"

truncate

rat.truncate â integerrat.truncate(precision=0) â rational Instance Public methods Returns the truncated value (toward zero). Rational(3).truncate #=> 3 Rational(2, 3).truncate #=> 0 Rational(-3, 2).truncate #=> -1 decimal - 1 2 3 . 4 5 6 ^ ^ ^ ^ ^ ^ precision -3 -2 -1 0 +1 +2 '%f' % Rational('-123.456').truncate(+1) #=> "-123.400000" '%f' % Rational('-123.456').truncate(-1) #=>

_warn_

_warn_() Class Public methods

const_missing

const_missing(name) Class Public methods

method_missing

method_missing(*args, &block) Class Public methods

respond_to_missing?

respond_to_missing?(*args, &block) Class Public methods

new

new(text, old_name, new_name, comment, singleton = false) Class Public methods Creates a new Alias with a token stream of text that aliases old_name to new_name, has comment and is a singleton context.

<=>

<=>(other) Instance Public methods Order by singleton then new_name

aref

aref() Instance Public methods HTML fragment reference for this alias

Popular Articles
@coversNothing @coversNothing The @coversNothing annotation can be used in the test code to specify that no code coverage information will be recorded for the ann
Reliability Reliability is an important property of any serious database system, and PostgreSQL does everything possible to guarantee reliable operation. One asp
Pod::Simple::PullParser -- a pull-parser interface to parsing Pod NAME SYNOPSIS DESCRIPTION METHODS NOTE SEE ALSO SUPPORT COPYRIGHT AND DISCLAIMERS AUTHOR NAME Pod::Simple::PullParser -- a pull-parser interface to
Jump To - Create a smooth jump to sub navigational menu Jump To is a plugin that let you create a jump to sub navigational menu automatically with 1 line of JS call. The menu can be used to assist your navi
perlutil - utilities packaged with the Perl distribution NAME DESCRIPTION LIST OF UTILITIESDocumentation Converters Administration Development General tools Installation SEE ALSO NAME perlutil - utiliti


Page 863 of 11844

|< < Prev 860 861 862 863 864 865 866 Next > >|
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions