Skip to content

Commit

Permalink
🚑️ 絶対応答加速度の最大は絶対値から計算する
Browse files Browse the repository at this point in the history
  • Loading branch information
azishio committed May 24, 2024
1 parent 6996996 commit 8170348
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
"use client";
import { InputSlider } from "@/components/InputSlider";
import { MyLineChart } from "@/components/MyLineChart";
import { dummyData } from "@/dummyData";
import { Loop, UploadFile } from "@mui/icons-material";
import {
Button,
ButtonGroup,
Divider,
Slider,
Stack,
Typography,
styled,
} from "@mui/material";
import {InputSlider} from "@/components/InputSlider";
import {MyLineChart} from "@/components/MyLineChart";
import {dummyData} from "@/dummyData";
import {Loop, UploadFile} from "@mui/icons-material";
import {Button, ButtonGroup, Divider, Slider, Stack, styled, Typography,} from "@mui/material";
import Box from "@mui/material/Box";
import type React from "react";
import type { ChangeEvent } from "react";
import { useEffect, useState } from "react";
import type { ResponseAccAnalyzerParams } from "seismic-response";
import type React, {ChangeEvent} from "react";
import {useEffect, useState} from "react";
import type {ResponseAccAnalyzerParams} from "seismic-response";

const VisuallyHiddenInput = styled("input")({
clip: "rect(0 0 0 0)",
Expand Down Expand Up @@ -125,7 +116,7 @@ export default function Home() {
);

const spectrum = resAccList.map((resAcc) => {
return resAcc.reduce((acc, cur) => Math.max(acc, cur), 0);
return resAcc.reduce((acc, cur) => Math.max(acc, Math.abs(cur)), 0);
});
setSpectrum(spectrum);
})();
Expand Down

0 comments on commit 8170348

Please sign in to comment.