TESnip-Skyrim-Edition / tesv-snip

Automatically exported from code.google.com/p/tesv-snip
GNU General Public License v3.0
0 stars 0 forks source link

TESVSnip Math Functions #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
TESVSnip does not Support Math Functions

div(100)
mult(0.01)

RotationFactor : Extended = 180/Pi;
RotationScale : Integer = 4;

function RadiansNormalize(const aElement: IwbElement; aFloat: Extended): 
Extended;
begin
//  Result := RoundToEx(aFloat, -6);
  Result := aFloat;

  while Result < 0.0 do
    Result := Result + TwoPi;
  while Result > TwoPi do
    Result := Result - TwoPi;
  if SingleSameValue(Result, 0.0) or (Result < 0.0) then
    Result := 0.0;
  if SingleSameValue(Result, TwoPi) or (Result > TwoPi) then
    Result := 0.0;

//  Result := RoundToEx(Result, -6);
end;

Original issue reported on code.google.com by danielhmpdx16@gmail.com on 22 Sep 2012 at 11:52