Translations:Angles/12/zh: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
No edit summary
No edit summary
 
Line 1: Line 1:
为了将玩家的偏航转换为弧度(当调用sin和cos时),游戏会使用这两个公式:<syntaxhighlight lang="java">
为了将玩家的偏航转换为弧度(当调用 sin cos 时),游戏会使用这两个公式:<syntaxhighlight lang="java">
//通用公式
//通用公式
f = this.rotationYaw * (float)Math.PI / 180.0F
f = this.rotationYaw * (float)Math.PI / 180.0F

Latest revision as of 15:37, 5 February 2022

Message definition (Angles)
To convert the player's yaw into radians (when calling sin and cos), the game uses two formulas:<syntaxhighlight lang="java">
//formula used in general
f = this.rotationYaw * (float)Math.PI / 180.0F

为了将玩家的偏航转换为弧度(当调用 sin 和 cos 时),游戏会使用这两个公式:<syntaxhighlight lang="java"> //通用公式 f = this.rotationYaw * (float)Math.PI / 180.0F