math.sinh()

Type Function
Library math.*
Return value Number
Revision Release 2024.3703
Keywords hyperbolic sine, sinh, sine, sin
See also math.cosh()
math.sin()

Overview

Returns the hyperbolic sine of x.

Syntax

math.sinh( x )
x (required)

Number. A number.

Example

-- move a circle along a path
local myCircle = display.newCircle( 0, display.viewableContentHeight/2, 20 )
myCircle:setFillColor( 1, 0, 0 )
local function onFrame(event)
    myCircle.y = display.viewableContentHeight/2 - math.sinh(15*(myCircle.x/display.viewableContentWidth-0.5))
    myCircle.x = (myCircle.x + 5) % display.viewableContentWidth
end
Runtime:addEventListener( "enterFrame", onFrame )