Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
21.3K+ articles
Python
21.3K+ articles
Experiences
16.6K+ articles
Interview Experiences
14.2K+ articles
JavaScript
12.1K+ articles
School Learning
11.5K+ articles
Java
10.0K+ articles
Ruby
1.2K+ articles
Ruby-Methods
926+ articles
Ruby Vector-class
24 posts
Recent Articles
Popular Articles
Ruby | Vector + method
Last Updated: 07 January 2020
The + is an inbuilt method in Ruby returns the addition of two vectorsSyntax: vec1 + vec2Parameters: The function does not accepts any parameter.Return Value: It returns ...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector - method
Last Updated: 20 December 2021
The - is an inbuilt method in Ruby returns the subtraction of two vectors Syntax: vec1 - vec2Parameters: The function does not accepts any parameter.Return Value: It retur...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector == method
Last Updated: 07 January 2020
The == is an inbuilt method in Ruby returns true if the two vectors have the same elements in the same order otherwise falseSyntax: vec1 == vec2Parameters: The function d...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector * method
Last Updated: 07 January 2020
The * is an inbuilt method in Ruby returns a vector by multiplying vector by xSyntax: vec1 * xParameters: The function does not accepts any parameter.Return Value: It ret...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector / method
Last Updated: 07 January 2020
The / is an inbuilt method in Ruby returns a vector by dividing vector by xSyntax: vec1 / xParameters: The function does not accepts any parameter.Return Value: It return...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector angle_with() function
Last Updated: 07 January 2020
The angle_with() is an inbuilt method in Ruby returns the angle between two vectors. The angle is always between 0 and Syntax: vec1.angle_with(vec2)Parameters: The functi...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector hash() function
Last Updated: 07 January 2020
The hash() is an inbuilt method in Ruby returns hash code of the vector Syntax: vec1.hash()Parameters: The function accepts no parameter.Return Value: It returns hash cod...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector r() function
Last Updated: 07 January 2020
The r() is an inbuilt method in Ruby returns the Pythagorean distance of the vector. Syntax: vec1.r()Parameters: The function accepts no parameterReturn Value: It Pythago...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector norm() function
Last Updated: 06 January 2020
The norm() is an inbuilt method in Ruby returns the pythagorean distance of the vector. Syntax: vec1.norm()Parameters: The function accepts no parameterReturn Value: It p...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector normalize() function
Last Updated: 07 January 2020
The normalize() is an inbuilt method in Ruby returns a new vector with the same direction but with norm equals to 1. Syntax: vec1.normalize()Parameters: The function acce...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector round() function
Last Updated: 07 January 2020
The round() is an inbuilt method in Ruby returns a new vector with entries rounded to the given precisionSyntax: vec1.round()Parameters: The function accepts a single par...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector size() function
Last Updated: 07 January 2020
The size() is an inbuilt method in Ruby returns the number of elements in the vectorSyntax: vec1.size()Parameters: The function accepts no parameterReturn Value: It retur...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector to_a() function
Last Updated: 07 January 2020
The to_a() is an inbuilt method in Ruby returns the array with elements of vectorSyntax: vec1.to_a()Parameters: The function accepts no parameterReturn Value: It returns ...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector to_matrix() function
Last Updated: 07 January 2020
The to_matrix() is an inbuilt method in Ruby returns the matrix of single column with elements of vector.Syntax: vec1.to_matrix()Parameters: The function accepts no param...
read more
Ruby
Ruby-Methods
Ruby Vector-class
Ruby | Vector zero?() function
Last Updated: 07 January 2020
The zero?() is an inbuilt method in Ruby returns boolean value true if all elements of vector are equals to zero otherwise falseSyntax: vec1.zero?()Parameters: The functi...
read more
Ruby
Ruby-Methods
Ruby Vector-class
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !