Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitedf5c6a

Browse files
sfreilichcopybara-github
authored andcommitted
Adjust JNI for Angle
PiperOrigin-RevId: 796490194
1 parent308fe61 commitedf5c6a

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

‎ink/geometry/internal/jni/angle_jni.cc‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,22 @@
1717
#include"ink/geometry/angle.h"
1818
#include"ink/jni/internal/jni_defines.h"
1919

20+
namespace {
21+
22+
using ::ink::Angle;
23+
24+
}// namespace
25+
2026
extern"C" {
2127

22-
JNI_METHOD(geometry, Angle, jfloat, nativeNormalized)
23-
(JNIEnv* env, jobject object, jfloat angle_radians) {
24-
ink::Angle angle =ink::Angle::Radians(angle_radians);
25-
return angle.Normalized().ValueInRadians();
28+
JNI_METHOD(geometry, AngleNative, jfloat, normalizedRadians)
29+
(JNIEnv* env, jobject object, jfloat radians) {
30+
returnAngle::Radians(radians).Normalized().ValueInRadians();
2631
}
2732

28-
JNI_METHOD(geometry, Angle, jfloat, nativeNormalizedAboutZero)
29-
(JNIEnv* env, jobject object, jfloat angle_radians) {
30-
ink::Angle angle =ink::Angle::Radians(angle_radians);
31-
return angle.NormalizedAboutZero().ValueInRadians();
32-
}
33+
JNI_METHOD(geometry, AngleNative, jfloat, normalizedAboutZeroRadians)
34+
(JNIEnv* env, jobject object, jfloat radians) {
35+
returnAngle::Radians(radians).NormalizedAboutZero().ValueInRadians();
3336
}
37+
38+
}// extern "C"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp