Class: Float
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#as_json(_options = nil) ⇒ Object
91 92 93 94 95 96 97 |
# File 'lib/openc3/io/json_rpc.rb', line 91 def as_json( = nil) return { "json_class" => "Float", "raw" => "Infinity" } if self.infinite? == 1 return { "json_class" => "Float", "raw" => "-Infinity" } if self.infinite? == -1 return { "json_class" => "Float", "raw" => "NaN" } if self.nan? return self end |