Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/quaternion_c2/to_type.rb
Instance Method Summary collapse
-
#to_q ⇒ Quaternion
Returns a quaternion which denotes the string form.
Instance Method Details
#to_q ⇒ Quaternion
Returns a quaternion which denotes the string form. The parser ignores leading whitespaces and trailing garbage. Any digit sequences can be separated by an underscore. Returns zero for null or garbage string.
202 203 204 |
# File 'lib/quaternion_c2/to_type.rb', line 202 def to_q Quaternion.send(:parse, self, false).to_q end |