Skip to content

Commit

Permalink
Check for Euler's number
Browse files Browse the repository at this point in the history
Updated is_literal in openscenario_parser.py so that it check for Euler's number.

OpenScenario files exported from RoadRunner contains values with Euler's number.
  • Loading branch information
haabe authored Nov 12, 2023
1 parent 70426c1 commit 5324864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srunner/tools/openscenario_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def is_literal(self) -> bool:
"""
Returns: True when text is a literal/number
"""
return self._is_matching(pattern=r"(-)?\d+(\.\d*)?")
return self._is_matching(pattern=r"(-)?\d+(\.\d*)?(e[+-]\d*)?")

def is_parameter(self) -> bool:
"""
Expand Down

0 comments on commit 5324864

Please sign in to comment.