Cos Function

Category: GUI » Visual Basic 6 » Function

Description: Returns a Double specifying the cosine of an angle Syntax: Cos(number)

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

Return Data Type: Double Usage / Example Code:

StatementResult / ValueRemark / Note
cos(1) 0.54030230586814  
cos(53) -0.918282786212119  
cos(5.3) 0.554374336179161  
cos(-1) 0.54030230586814  
cos(0) 1  
cos(unknown) 1 Uninitialized variable
cos(null) Error Run-time error '94': Invalid use of Null
cos("string") Error Run-time error '13': Type mismatch
cos("5.3") 0.554374336179161 input number as string
cos(True) 0.54030230586814 True - Non zero
cos(False) 1 False - Zero
cos() Error Compile error: Argument not optional

Related Articles:

Tags: Math Functions, vb6