basmaths.bas

来自「这是一个立体视觉程序」· BAS 代码 · 共 34 行

BAS
34
字号
Attribute VB_Name = "basMaths"
Option Explicit


Public Type RGBthingy
  Value As Long
End Type

Public Type RGBpoint
  Red As Byte
  Green As Byte
  Blue As Byte
End Type


Public Function Acos(x As Single) As Single
  If (Abs(x) >= 1) Then
    x = 0.9999 * (x / Abs(x))
  End If
  Acos = Atn(-x / Sqr(-x * x + 1)) + 2 * Atn(1)
End Function


Public Function function_Gaussian(Distance As Single, width As Single) As Single
'returns a gaussian normal distribution
  function_Gaussian = Exp(-(Distance ^ 2) / (2 * (width ^ 2)))
End Function


Public Function function_sigmoid(x As Single) As Single
  function_sigmoid = (1# / (1# + Exp(-x)))
End Function

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?