如何将科学记数法中的数字指定给C#中的变量?
我希望使用Plancks Constant,即6.626 X 10 -34
这是我所拥有的不正确的代码:
CXHandle
答案 0 :(得分:13)
您应该可以将double PlancksConstant = 6.626e-34
声明为<!DOCTYPE html>
<html>
<head>
<style>
#map {
height: 400px;
width: 100%;
}
</style>
</head>
<body>
<h3>My Google Maps Demo</h3>
<div id="map"></div>
<script type ="text/javascript">
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: {lat: -24.363, lng: 131.044},
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var places = [
{lat: -25.363, lng: 131.044, Name: "Uluru"},
{lat:-24.363, lng: 131.044, Name: "Placeland"}];
var marker, i;
var markers = new Array();
for(var i=0; i<places.length; i++){
var marker = new google.maps.Marker({
position: places[i],
map: map,
title: places[i].Name
//I am trying to get a marker with this but am not sure if the code is incorrect.
});
}
}
</script>
<script
src="https://maps.googleapis.com/maps/api/js?key=APIKey&callback=initMap">
//I am not sure what going on for some reason the map will not load and I am not sure if it is because of issues with my formatting or what, but I am lost.
</script>
</body>
</html>
并将6.626乘以10e-34,如:
li.product{
width:100%;
@include media-breakpoint-up(md) {
width:48%;
}
@include media-breakpoint-up(lg) {
width:22.05%;
}
}
答案 1 :(得分:10)
你可以这样设置(注意decimal PlancksConstant = 6.626E-34M;
类型的decimal
后缀):
double
但实际为0 ,因为您无法将幅度小于1E-28的数字表示为double PlancksConstant = 6.626E-34;
。
所以你需要使用PlancksConstant
来代替它:
double