Browse Source

* sincos result parameters changed from var to out

git-svn-id: trunk@5807 -
florian 18 years ago
parent
commit
f6fe70ae0c
1 changed files with 13 additions and 13 deletions
  1. 13 13
      rtl/objpas/math.pp

+ 13 - 13
rtl/objpas/math.pp

@@ -243,7 +243,7 @@ function SimpleRoundTo(const AValue: Double; const Digits: TRoundToRange = -2):
 {$endif}
 {$endif}
 {$ifdef FPC_HAS_TYPE_EXTENDED}
 {$ifdef FPC_HAS_TYPE_EXTENDED}
 function SimpleRoundTo(const AValue: Extended; const Digits: TRoundToRange = -2): Extended;
 function SimpleRoundTo(const AValue: Extended; const Digits: TRoundToRange = -2): Extended;
-{$endif}  
+{$endif}
 
 
 
 
 { angle conversion }
 { angle conversion }
@@ -262,7 +262,7 @@ function radtocycle(rad : float) : float;
 
 
 function tan(x : float) : float;
 function tan(x : float) : float;
 function cotan(x : float) : float;
 function cotan(x : float) : float;
-procedure sincos(theta : float;var sinus,cosinus : float);
+procedure sincos(theta : float;out sinus,cosinus : float);
 
 
 { inverse functions }
 { inverse functions }
 
 
@@ -506,10 +506,10 @@ function norm(const data : array of Extended) : float;
 function norm(const data : PExtended; Const N : Integer) : float;
 function norm(const data : PExtended; Const N : Integer) : float;
 {$endif FPC_HAS_TYPE_EXTENDED}
 {$endif FPC_HAS_TYPE_EXTENDED}
 
 
-function ifthen(val:boolean;const iftrue:integer; const iffalse:integer= 0) :integer; inline; 
-function ifthen(val:boolean;const iftrue:int64  ; const iffalse:int64 = 0)  :int64;   inline; 
-function ifthen(val:boolean;const iftrue:double ; const iffalse:double =0.0):double;  inline; 
-function ifthen(val:boolean;const iftrue:String ; const iffalse:String ='') :String;  inline; 
+function ifthen(val:boolean;const iftrue:integer; const iffalse:integer= 0) :integer; inline;
+function ifthen(val:boolean;const iftrue:int64  ; const iffalse:int64 = 0)  :int64;   inline;
+function ifthen(val:boolean;const iftrue:double ; const iffalse:double =0.0):double;  inline;
+function ifthen(val:boolean;const iftrue:String ; const iffalse:String ='') :String;  inline;
 
 
 function CompareValue ( const A, B  : Integer) : TValueRelationship; inline;
 function CompareValue ( const A, B  : Integer) : TValueRelationship; inline;
 function CompareValue ( const A, B  : Int64) : TValueRelationship; inline;
 function CompareValue ( const A, B  : Int64) : TValueRelationship; inline;
@@ -668,7 +668,7 @@ function cotan(x : float) : float;
      cotan:=Cos(X)/Sin(X);
      cotan:=Cos(X)/Sin(X);
   end;
   end;
 
 
-procedure sincos(theta : float;var sinus,cosinus : float);
+procedure sincos(theta : float;out sinus,cosinus : float);
 
 
   begin
   begin
     sinus:=sin(theta);
     sinus:=sin(theta);
@@ -903,7 +903,7 @@ begin
         Dec(Exponent);
         Dec(Exponent);
       until (abs(X)>=0.5)
       until (abs(X)>=0.5)
     else
     else
-      while (abs(X)>=1) do 
+      while (abs(X)>=1) do
         begin
         begin
         X:=X/2;
         X:=X/2;
         Inc(Exponent);
         Inc(Exponent);
@@ -2162,7 +2162,7 @@ end;
 
 
 // dilemma here. asm can do the two comparisons in one go?
 // dilemma here. asm can do the two comparisons in one go?
 // but pascal is portable and can be i inline;ed. Ah well, we need purepascal's anyway:
 // but pascal is portable and can be i inline;ed. Ah well, we need purepascal's anyway:
-function CompareValue ( const A, B  : Integer) : TValueRelationship; 
+function CompareValue ( const A, B  : Integer) : TValueRelationship;
 
 
 begin
 begin
   result:=GreaterThanValue;
   result:=GreaterThanValue;
@@ -2173,7 +2173,7 @@ begin
      result:=LessThanValue;
      result:=LessThanValue;
 end;
 end;
 
 
-function CompareValue ( const A, B  : Int64) : TValueRelationship; 
+function CompareValue ( const A, B  : Int64) : TValueRelationship;
 
 
 begin
 begin
   result:=GreaterThanValue;
   result:=GreaterThanValue;
@@ -2197,7 +2197,7 @@ end;
 {$endif}
 {$endif}
 
 
 {$ifdef FPC_HAS_TYPE_DOUBLE}
 {$ifdef FPC_HAS_TYPE_DOUBLE}
-function CompareValue ( const A, B : Double; delta : Double = 0.0) : TValueRelationship; 
+function CompareValue ( const A, B : Double; delta : Double = 0.0) : TValueRelationship;
 begin
 begin
   result:=GreaterThanValue;
   result:=GreaterThanValue;
   if abs(a-b)<=delta then
   if abs(a-b)<=delta then
@@ -2277,7 +2277,7 @@ var
 begin
 begin
   RV:=IntPower(10,Digits);
   RV:=IntPower(10,Digits);
   Result:=Trunc((AValue/RV)+0.5)*RV;
   Result:=Trunc((AValue/RV)+0.5)*RV;
-end;  
+end;
 {$endif}
 {$endif}
 
 
 {$ifdef FPC_HAS_TYPE_EXTENDED}
 {$ifdef FPC_HAS_TYPE_EXTENDED}
@@ -2290,6 +2290,6 @@ begin
   RV:=IntPower(10,Digits);
   RV:=IntPower(10,Digits);
   Result:=Trunc((AValue/RV)+0.5)*RV;
   Result:=Trunc((AValue/RV)+0.5)*RV;
 end;
 end;
-{$endif}  
+{$endif}
 
 
 end.
 end.