Skip to content
  • This project
    • Loading...
  • Sign in

金学艇 / xhx

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • xhx
  • ..
  • utils
  • CustomMath.lua
  • jinwawa's avatar
    0509 · 7b96a3da
    7b96a3da
    jinwawa authored 2019-05-09 20:22:06 +0800
CustomMath.lua 330 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

cc.exports.CustomMath = class("CustomMath")

-- 自定义数学公式类
function CustomMath:ctor(  )
	
end

-- C++的三元表达式 如果condition为true 返回param1 否则返回param2
function CustomMath:AndOr( condition, param1, param2 )

	if condition then
		return param1
	else
		return param2
	end
end

return CustomMath