Changes have been pushed for the project "Fawkes Robotics Software Framework".

Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, tneumann/lua-math has been created
        at  238b1cff000d8f61482227eaefcbf660875ca133 (commit)

http://git.fawkesrobotics.org/fawkes.git/tneumann/lua-math

- *Log* ---------------------------------------------------------------
commit 238b1cff000d8f61482227eaefcbf660875ca133
Author:     Tobias Neumann <tobias.neum...@alumni.fh-aachen.de>
AuthorDate: Tue Jul 1 17:29:51 2014 +0200
Commit:     Tobias Neumann <tobias.neum...@alumni.fh-aachen.de>
CommitDate: Tue Jul 1 17:29:51 2014 +0200

    lua-math: add math.nan and math.isnan() for lua

http://git.fawkesrobotics.org/fawkes.git/commit/238b1cf
http://trac.fawkesrobotics.org/changeset/238b1cf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------


- *Diffs* -------------------------------------------------------------

- *commit* 238b1cff000d8f61482227eaefcbf660875ca133 - - - - - - - - - -
Author:  Tobias Neumann <tobias.neum...@alumni.fh-aachen.de>
Date:    Tue Jul 1 17:29:51 2014 +0200
Subject: lua-math: add math.nan and math.isnan() for lua

 src/lua/fawkes/mathext.lua |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/fawkes/mathext.lua b/src/lua/fawkes/mathext.lua
index ffd827c..81f99aa 100644
--- a/src/lua/fawkes/mathext.lua
+++ b/src/lua/fawkes/mathext.lua
@@ -86,3 +86,12 @@ end
 function math.vec_length(x, y)
    return math.sqrt(x^2 + y^2)
 end
+
+math.nan = 0/0
+
+--- Check if given value is nan
+-- @param v the value to check
+-- @return true if the value is nan, false otherwise
+function math.isnan( v )
+   return v ~= v
+end




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org
_______________________________________________
fawkes-commits mailing list
fawkes-commits@lists.kbsg.rwth-aachen.de
https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits

Reply via email to