标题:谁给解释这段代码 谢谢
只看楼主
kaihua
Rank: 1
等 级:新手上路
帖 子:78
专家分:0
注 册:2004-11-26
结帖率:66.67%
 问题点数:0 回复次数:0 
谁给解释这段代码 谢谢
window.RightTriangle = function(o) {
        var a = {
            a: null,
            b: null,
            c: null,
            A: null,
            B: null,
            C: 90
        };
        return o.a ? (a.a = o.a, o.b || o.c ? (o.b ? (a.b = o.b, a.c = Math.sqrt(Math.pow(a.a, 2) + Math.pow(a.b, 2))) : (a.c = o.c, a.b = Math.sqrt(Math.pow(a.c, 2) - Math.pow(a.a, 2))), a.B = t(Math.acos(a.a / a.c)), a.A = 90 - a.B) : (o.A || o.B) && (a = n(a, o.A, o.B), a.b = a.a * Math.tan(e(a.B)), a.c = a.a / Math.cos(e(a.B)))) : o.b ? (a.b = o.b, o.c ? (a.c = o.c, a.a = Math.sqrt(Math.pow(a.c, 2) - Math.pow(a.b, 2)), a.B = t(Math.acos(a.a / a.c)), a.A = 90 - a.B) : (o.A || o.B) && (a = n(a, o.A, o.B), a.a = a.b * Math.tan(e(a.A)), a.c = a.b / Math.cos(e(a.A)))) : o.c && (a.c = o.c, (o.A || o.B) && (a = n(a, o.A, o.B), a.a = a.c * Math.sin(e(a.A)), a.b = a.c * Math.cos(e(a.A)))),
        a
    }
搜索更多相关主题的帖子: null || Math sqrt pow 
2017-11-06 10:19



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-482167-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.817029 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved