-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use UnmanagedCallersOnly for delegates
- Loading branch information
Showing
14 changed files
with
659 additions
and
677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ARMeilleure.Instructions | ||
{ | ||
static class MathHelper | ||
{ | ||
[UnmanagedCallersOnly] | ||
public static double Abs(double value) | ||
{ | ||
return Math.Abs(value); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
public static double Ceiling(double value) | ||
{ | ||
return Math.Ceiling(value); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
public static double Floor(double value) | ||
{ | ||
return Math.Floor(value); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
public static double Round(double value, int mode) | ||
{ | ||
return Math.Round(value, (MidpointRounding)mode); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
public static double Truncate(double value) | ||
{ | ||
return Math.Truncate(value); | ||
} | ||
} | ||
|
||
static class MathHelperF | ||
{ | ||
[UnmanagedCallersOnly] | ||
public static float Abs(float value) | ||
{ | ||
return MathF.Abs(value); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
public static float Ceiling(float value) | ||
{ | ||
return MathF.Ceiling(value); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
public static float Floor(float value) | ||
{ | ||
return MathF.Floor(value); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
public static float Round(float value, int mode) | ||
{ | ||
return MathF.Round(value, (MidpointRounding)mode); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
public static float Truncate(float value) | ||
{ | ||
return MathF.Truncate(value); | ||
} | ||
} | ||
} |
Oops, something went wrong.