Changeset 92


Ignore:
Timestamp:
Feb 12, 2007, 11:47:19 AM (18 years ago)
Author:
konisi
Message:

basicフォルダ内の整備、掲示板にエラーを報告したもの以外は型チェック終了しました。

Location:
Include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/Math.ab

    r91 r92  
    147147        End If
    148148
    149         Return Sin(_System_HalfPI - Abs(x))
     149        Return Math.Sin((_System_HalfPI - Abs(x)) As Double)
    150150    End Function
    151151
     
    510510        Dim t As Double
    511511
    512         t = urTan(value * 0.5, k)
     512        t = urTan((value * 0.5) As Double, k)
    513513        t = 2 * t / (1 + t * t)
    514514        If (k And 1) = 0 Then 'k mod 2 = 0 Then
     
    587587    End Function
    588588
     589    'ToString
     590
    589591    Static Function Truncate(x As Double) As Double
    590592        return Fix(x)
    591593    End Function
    592594
    593 Private
     595'Private
    594596    Static Function urTan(x As Double, ByRef k As Long) As Double
    595597        Dim i As Long
     
    597599
    598600        If x >= 0 Then
    599             k = ( ( Fix(x * _System_InverseHalfPI) As Double ) + 0.5 ) As Long
    600         Else
    601             k = ( ( Fix(x * _System_InverseHalfPI) As Double ) - 0.5 ) As Long
     601            k = Fix(x * _System_InverseHalfPI) + 0.5
     602        Else
     603            k = Fix(x * _System_InverseHalfPI) - 0.5
    602604        End If
    603605        x = (x - (3217.0 / 2048.0) * k) + _System_D * k
  • Include/basic/function.sbp

    r57 r92  
    139139Function _System_SetSign(x As Double, isNegative As Long) As Double
    140140#ifdef _WIN64
    141     SetQWord(VarPtr(CopySign), (GetQWord(VarPtr(x)) And &h7fffffffffffffff) Or (isNegative << 63))
     141    SetQWord(AddressOf(CopySign), (GetQWord(VarPtr(x)) And &h7fffffffffffffff) Or (isNegative << 63))
    142142#else
    143     SetDWord(VarPtr(CopySign), GetDWord(VarPtr(x)))
    144     SetDWord(VarPtr(CopySign) + SizeOf (DWord), GetQWord(VarPtr(x) + SizeOf (DWord)) And &h7fffffff Or (isNegative << 31))
     143    SetDWord(AddressOf(CopySign), GetDWord(VarPtr(x)))
     144    SetDWord(AddressOf(CopySign) + SizeOf (DWord), GetQWord(VarPtr(x) + SizeOf (DWord)) And &h7fffffff Or (isNegative << 31))
    145145#endif
    146146End Function
     
    175175
    176176Function CDWord(num As Double) As DWord
    177     CDWord=num
     177    CDWord=num As DWord
    178178End Function
    179179
    180180Function CInt(number As Double) As Long
    181     CInt=number
     181    CInt=number As Long
    182182End Function
    183183
    184184Function CSng(number As Double) As Single
    185     CSng=number
     185    CSng=number As Single
    186186End Function
    187187
     
    279279
    280280Function Sin(number As Double) As Double
    281     Sin = Math.Sin(number)
     281    Sin = Math.Sign(number)
    282282End Function
    283283
     
    322322    p[0] = 0
    323323    nan = _System_GetInf(/*x,*/ FALSE)
    324     IsNaNOrInf = (memcmp(p, VarPtr(nan), SizeOf (Double)) = 0)
     324    IsNaNOrInf = (memcmp(p As BytePtr, VarPtr(nan), SizeOf (Double)) = 0)
    325325End Function
    326326
Note: See TracChangeset for help on using the changeset viewer.