Tan Function

Category: GUI » Visual Basic 6 » Function

Description: Returns a Double specifying the tangent of an angle Syntax: Tan(number)

number Required. A valid numeric expression that expresses an angle in radians

Return Data Type: Double Usage / Example Code:

StatementResult / ValueRemark / Note
tan(1) 1.5574077246549  
tan(53) -0.431158196719564  
tan(5.3) -1.50127339580693  
tan(-1) -1.5574077246549  
tan(0) 0  
tan(unknown) 0 Uninitialized variable
tan(null) Error Run-time error '94': Invalid use of Null
tan("string") Error Run-time error '13': Type mismatch
tan("5.3") -1.50127339580693 Input number as string
tan(true) -1.5574077246549  
tan(false) 0  
tan() Error Compile error: Argument not optional

Related Articles:

Tags: Math Functions, vb6